OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
metadata_proxy_extern.h
Go to the documentation of this file.
1 #ifndef METADATA_PROXY_EXTERN
2 #define METADATA_PROXY_EXTERN
3 
4 #include <isc/result.h>
5 
6 typedef void isc_md_type_t;
7 #define ISC_MD_MD5 isc__crypto_md5
8 #define ISC_MD_SHA1 isc__crypto_sha1
9 #define ISC_MD_SHA224 isc__crypto_sha224
10 #define ISC_MD_SHA256 isc__crypto_sha256
11 #define ISC_MD_SHA384 isc__crypto_sha384
12 #define ISC_MD_SHA512 isc__crypto_sha512
13 
14 #define ISC_MD5_DIGESTLENGTH isc_md_type_get_size(ISC_MD_MD5)
15 #define ISC_MD5_BLOCK_LENGTH isc_md_type_get_block_size(ISC_MD_MD5)
16 #define ISC_SHA1_DIGESTLENGTH isc_md_type_get_size(ISC_MD_SHA1)
17 #define ISC_SHA1_BLOCK_LENGTH isc_md_type_get_block_size(ISC_MD_SHA1)
18 #define ISC_SHA224_DIGESTLENGTH isc_md_type_get_size(ISC_MD_SHA224)
19 #define ISC_SHA224_BLOCK_LENGTH isc_md_type_get_block_size(ISC_MD_SHA224)
20 #define ISC_SHA256_DIGESTLENGTH isc_md_type_get_size(ISC_MD_SHA256)
21 #define ISC_SHA256_BLOCK_LENGTH isc_md_type_get_block_size(ISC_MD_SHA256)
22 #define ISC_SHA384_DIGESTLENGTH isc_md_type_get_size(ISC_MD_SHA384)
23 #define ISC_SHA384_BLOCK_LENGTH isc_md_type_get_block_size(ISC_MD_SHA384)
24 #define ISC_SHA512_DIGESTLENGTH isc_md_type_get_size(ISC_MD_SHA512)
25 #define ISC_SHA512_BLOCK_LENGTH isc_md_type_get_block_size(ISC_MD_SHA512)
26 
27 #define ISC_MAX_MD_SIZE 64U /* EVP_MAX_MD_SIZE */
28 #define ISC_MAX_BLOCK_SIZE 128U /* ISC_SHA512_BLOCK_LENGTH */
29 
30 #include <openssl/evp.h>
31 
32 extern const EVP_MD *isc__crypto_md5;
33 extern const EVP_MD *isc__crypto_sha1;
34 extern const EVP_MD *isc__crypto_sha224;
35 extern const EVP_MD *isc__crypto_sha256;
36 extern const EVP_MD *isc__crypto_sha384;
37 extern const EVP_MD *isc__crypto_sha512;
38 
39 
40 extern isc_result_t
41 isc_hmac(const isc_md_type_t *type, const void *key, const size_t keylen,
42  const unsigned char *buf, const size_t len, unsigned char *digest,
43  unsigned int *digestlen);
44 
45 #endif
const EVP_MD * isc__crypto_sha256
void isc_md_type_t
const EVP_MD * isc__crypto_sha224
isc_result_t isc_hmac(const isc_md_type_t *type, const void *key, const size_t keylen, const unsigned char *buf, const size_t len, unsigned char *digest, unsigned int *digestlen)
const EVP_MD * isc__crypto_md5
uint8_t type
Definition: load_balance.h:109
const EVP_MD * isc__crypto_sha512
const EVP_MD * isc__crypto_sha384
const EVP_MD * isc__crypto_sha1