-
Notifications
You must be signed in to change notification settings - Fork 321
Expand file tree
/
Copy pathBRCryptoHasher.h
More file actions
55 lines (44 loc) Β· 1.3 KB
/
BRCryptoHasher.h
File metadata and controls
55 lines (44 loc) Β· 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//
// BRCryptoHasher.h
// BRCore
//
// Created by Michael Carrara on 9/23/19.
// Copyright Β© 2019 Breadwinner AG. All rights reserved.
//
// See the LICENSE file at the project root for license information.
// See the CONTRIBUTORS file at the project root for a list of contributors.
#ifndef BRCryptoHasher_h
#define BRCryptoHasher_h
#include "BRCryptoBase.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
CRYPTO_HASHER_SHA1,
CRYPTO_HASHER_SHA224,
CRYPTO_HASHER_SHA256,
CRYPTO_HASHER_SHA256_2,
CRYPTO_HASHER_SHA384,
CRYPTO_HASHER_SHA512,
CRYPTO_HASHER_SHA3,
CRYPTO_HASHER_RMD160,
CRYPTO_HASHER_HASH160,
CRYPTO_HASHER_KECCAK256,
CRYPTO_HASHER_MD5
} BRCryptoHasherType;
typedef struct BRCryptoHasherRecord *BRCryptoHasher;
extern BRCryptoHasher
cryptoHasherCreate(BRCryptoHasherType type);
extern size_t
cryptoHasherLength (BRCryptoHasher hasher);
extern BRCryptoBoolean
cryptoHasherHash (BRCryptoHasher hasher,
uint8_t *dst,
size_t dstLen,
const uint8_t *src,
size_t srcLen);
DECLARE_CRYPTO_GIVE_TAKE (BRCryptoHasher, cryptoHasher);
#ifdef __cplusplus
}
#endif
#endif /* BRCryptoHasher_h */