Sets the value of 'iv' to SHA-256's initial value. * * Precondition: uint32_t iv[8] */
| 112 | * Precondition: uint32_t iv[8] |
| 113 | */ |
| 114 | static 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 | * |
no outgoing calls
no test coverage detected