MCPcopy Create free account
hub / github.com/F-Stack/f-stack / SHA512_Init

Function SHA512_Init

freebsd/crypto/sha2/sha512c.c:258–274  ·  view source on GitHub ↗

SHA-512 initialization. Begins a SHA-512 operation. */

Source from the content-addressed store, hash-verified

256
257/* SHA-512 initialization. Begins a SHA-512 operation. */
258void
259SHA512_Init(SHA512_CTX * ctx)
260{
261
262 /* Zero bits processed so far */
263 ctx->count[0] = ctx->count[1] = 0;
264
265 /* Magic initialization constants */
266 ctx->state[0] = 0x6a09e667f3bcc908ULL;
267 ctx->state[1] = 0xbb67ae8584caa73bULL;
268 ctx->state[2] = 0x3c6ef372fe94f82bULL;
269 ctx->state[3] = 0xa54ff53a5f1d36f1ULL;
270 ctx->state[4] = 0x510e527fade682d1ULL;
271 ctx->state[5] = 0x9b05688c2b3e6c1fULL;
272 ctx->state[6] = 0x1f83d9abfb41bd6bULL;
273 ctx->state[7] = 0x5be0cd19137e2179ULL;
274}
275
276/* Add bytes into the hash */
277void

Callers 2

partial_hash_sha512Function · 0.50
partial_hash_sha512Function · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected