33 #if defined(HAVE_SHA384) || defined(HAVE_SHA512)
36 #define CX_SHA384_SIZE 48
38 #define CX_SHA512_SIZE 64
44 struct cx_hash_header_s header;
50 typedef struct cx_sha512_s cx_sha512_t;
62 cx_err_t cx_sha384_init_no_throw(cx_sha512_t *hash);
72 static inline int cx_sha384_init(cx_sha512_t *hash)
74 cx_sha384_init_no_throw(hash);
90 cx_err_t cx_sha384_hash_iovec(
const cx_iovec_t *iovec,
92 uint8_t digest[
static CX_SHA384_SIZE]);
106 static inline cx_err_t cx_sha384_hash(
const uint8_t *in,
108 uint8_t digest[
static CX_SHA384_SIZE])
112 return cx_sha384_hash_iovec(&iovec, 1, digest);
125 cx_err_t cx_sha512_init_no_throw(cx_sha512_t *hash);
135 static inline int cx_sha512_init(cx_sha512_t *hash)
137 cx_sha512_init_no_throw(hash);
153 cx_err_t cx_sha512_hash_iovec(
const cx_iovec_t *iovec,
155 uint8_t digest[
static CX_SHA512_SIZE]);
169 static inline cx_err_t cx_sha512_hash(
const uint8_t *in,
171 uint8_t digest[
static CX_SHA512_SIZE])
175 return cx_sha512_hash_iovec(&iovec, 1, digest);
190 size_t cx_hash_sha512(
const uint8_t *in,
size_t in_len,
uint8_t *out,
size_t out_len);
Similar to libc iovec type.