53 #define SPH_SIZE_sha224 224 58 #define SPH_SIZE_sha256 256 71 #ifndef DOXYGEN_IGNORE 72 unsigned char buf[64];
106 void sph_sha224(
void *cc,
const void *data,
size_t len);
155 #ifdef DOXYGEN_IGNORE 164 void sph_sha256(
void *cc,
const void *data,
size_t len);
167 #ifndef DOXYGEN_IGNORE 168 #define sph_sha256 sph_sha224 197 #ifdef DOXYGEN_IGNORE 208 #ifndef DOXYGEN_IGNORE 209 #define sph_sha256_comp sph_sha224_comp 217 #define SPH_SIZE_sha384 384 222 #define SPH_SIZE_sha512 512 235 #ifndef DOXYGEN_IGNORE 236 unsigned char buf[128];
240 } sph_sha384_context;
248 void sph_sha384_init(
void *cc);
258 void sph_sha384(
void *cc,
const void *data,
size_t len);
269 void sph_sha384_close(
void *cc,
void *dst);
284 void sph_sha384_addbits_and_close(
void *cc,
unsigned ub,
unsigned n,
void *dst);
297 void sph_sha384_comp(
const sph_u64 msg[16], sph_u64 val[8]);
305 typedef sph_sha384_context sph_sha512_context;
313 void sph_sha512_init(
void *cc);
315 #ifdef DOXYGEN_IGNORE 324 void sph_sha512(
void *cc,
const void *data,
size_t len);
327 #ifndef DOXYGEN_IGNORE 328 #define sph_sha512 sph_sha384 340 void sph_sha512_close(
void *cc,
void *dst);
355 void sph_sha512_addbits_and_close(
void *cc,
unsigned ub,
unsigned n,
void *dst);
357 #ifdef DOXYGEN_IGNORE 365 void sph_sha512_comp(
const sph_u64 msg[16], sph_u64 val[8]);
368 #ifndef DOXYGEN_IGNORE 369 #define sph_sha512_comp sph_sha384_comp
void sph_sha224_comp(const sph_u32 msg[16], sph_u32 val[8])
Apply the SHA-224 compression function on the provided data.
void sph_sha256_close(void *cc, void *dst)
Terminate the current SHA-256 computation and output the result into the provided buffer...
void sph_sha256_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst)
Add a few additional bits (0 to 7) to the current computation, then terminate it and output the resul...
void sph_sha224(void *cc, const void *data, size_t len)
Process some data bytes.
sph_sha224_context sph_sha256_context
This structure is a context for SHA-256 computations.
This structure is a context for SHA-224 computations: it contains the intermediate values and some da...
void sph_sha224_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst)
Add a few additional bits (0 to 7) to the current computation, then terminate it and output the resul...
void sph_sha224_close(void *cc, void *dst)
Terminate the current SHA-224 computation and output the result into the provided buffer...
void sph_sha224_init(void *cc)
Initialize a SHA-224 context.
void sph_sha256_init(void *cc)
Initialize a SHA-256 context.