MCPcopy Create free account
hub / github.com/ElementsProject/elements / sha256_iv

Function sha256_iv

src/simplicity/sha256.h:114–123  ·  view source on GitHub ↗

Sets the value of 'iv' to SHA-256's initial value. * * Precondition: uint32_t iv[8] */

Source from the content-addressed store, hash-verified

112 * Precondition: uint32_t iv[8]
113 */
114static inline void sha256_iv(uint32_t* iv) {
115 iv[0] = 0x6a09e667ul;
116 iv[1] = 0xbb67ae85ul;
117 iv[2] = 0x3c6ef372ul;
118 iv[3] = 0xa54ff53aul;
119 iv[4] = 0x510e527ful;
120 iv[5] = 0x9b05688cul;
121 iv[6] = 0x1f83d9abul;
122 iv[7] = 0x5be0cd19ul;
123}
124
125/* Given a 256-bit 'midstate' and a 512-bit 'block', then 'midstate' becomes the value of the SHA-256 compression function ("added" to the original 'midstate' value).
126 *

Callers 6

simplicity_sha_256_ivFunction · 0.85
sha256_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected