46 #ifndef __LDNS_SHA2_H__
47 #define __LDNS_SHA2_H__
52 #if LDNS_BUILD_CONFIG_HAVE_INTTYPES_H
53 # include <inttypes.h>
62 #define LDNS_SHA256_BLOCK_LENGTH 64
63 #define LDNS_SHA256_DIGEST_LENGTH 32
64 #define LDNS_SHA256_DIGEST_STRING_LENGTH (LDNS_SHA256_DIGEST_LENGTH * 2 + 1)
65 #define LDNS_SHA384_BLOCK_LENGTH 128
66 #define LDNS_SHA384_DIGEST_LENGTH 48
67 #define LDNS_SHA384_DIGEST_STRING_LENGTH (LDNS_SHA384_DIGEST_LENGTH * 2 + 1)
68 #define LDNS_SHA512_BLOCK_LENGTH 128
69 #define LDNS_SHA512_DIGEST_LENGTH 64
70 #define LDNS_SHA512_DIGEST_STRING_LENGTH (LDNS_SHA512_DIGEST_LENGTH * 2 + 1)
112 unsigned char *
ldns_sha256(
const unsigned char *data,
unsigned int data_len,
unsigned char *digest);
124 unsigned char *
ldns_sha384(
const unsigned char *data,
unsigned int data_len,
unsigned char *digest);
136 unsigned char *
ldns_sha512(
const unsigned char *data,
unsigned int data_len,
unsigned char *digest);
unsigned char * ldns_sha384(const unsigned char *data, unsigned int data_len, unsigned char *digest)
Convenience function to digest a fixed block of data at once.
ldns_sha512_CTX ldns_sha384_CTX
void ldns_sha512_update(ldns_sha512_CTX *, const uint8_t *, size_t)
#define LDNS_SHA512_BLOCK_LENGTH
void ldns_sha256_final(uint8_t[32], ldns_sha256_CTX *)
void ldns_sha384_init(ldns_sha384_CTX *)
unsigned char * ldns_sha256(const unsigned char *data, unsigned int data_len, unsigned char *digest)
Convenience function to digest a fixed block of data at once.
void ldns_sha512_init(ldns_sha512_CTX *)
#define LDNS_SHA512_DIGEST_LENGTH
#define LDNS_SHA256_BLOCK_LENGTH
unsigned char * ldns_sha512(const unsigned char *data, unsigned int data_len, unsigned char *digest)
Convenience function to digest a fixed block of data at once.
void ldns_sha512_final(uint8_t[64], ldns_sha512_CTX *)
#define LDNS_SHA384_DIGEST_LENGTH
void ldns_sha256_update(ldns_sha256_CTX *, const uint8_t *, size_t)
#define LDNS_SHA256_DIGEST_LENGTH
void ldns_sha384_update(ldns_sha384_CTX *, const uint8_t *, size_t)
struct _ldns_sha512_CTX ldns_sha512_CTX
struct _ldns_sha256_CTX ldns_sha256_CTX
void ldns_sha256_init(ldns_sha256_CTX *)
void ldns_sha384_final(uint8_t[48], ldns_sha384_CTX *)