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;
50typedef struct cx_sha512_s cx_sha512_t;
62cx_err_t cx_sha384_init_no_throw(cx_sha512_t *hash);
72static inline int cx_sha384_init(cx_sha512_t *hash)
74 cx_sha384_init_no_throw(hash);
90cx_err_t cx_sha384_hash_iovec(
const cx_iovec_t *iovec,
92 uint8_t digest[
static CX_SHA384_SIZE]);
106static 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);
125cx_err_t cx_sha512_init_no_throw(cx_sha512_t *hash);
135static inline int cx_sha512_init(cx_sha512_t *hash)
137 cx_sha512_init_no_throw(hash);
149WARN_UNUSED_RESULT cx_err_t cx_sha512_update(cx_sha512_t *ctx,
const uint8_t *data,
size_t len);
158cx_err_t cx_sha512_final(cx_sha512_t *ctx, uint8_t *digest);
172cx_err_t cx_sha512_hash_iovec(
const cx_iovec_t *iovec,
174 uint8_t digest[
static CX_SHA512_SIZE]);
188static inline cx_err_t cx_sha512_hash(
const uint8_t *in,
190 uint8_t digest[
static CX_SHA512_SIZE])
194 return cx_sha512_hash_iovec(&iovec, 1, digest);
209size_t cx_hash_sha512(
const uint8_t *in,
size_t in_len, uint8_t *out,
size_t out_len);
Similar to libc iovec type.