One round of SHA-256. * * Precondition: NULL != d * NULL != h * d != h */
| 27 | * d != h |
| 28 | */ |
| 29 | static inline void Round(uint32_t a, uint32_t b, uint32_t c, uint32_t* d, uint32_t e, uint32_t f, uint32_t g, uint32_t* h, uint32_t k) { |
| 30 | uint32_t t1 = 1U * *h + Sigma1(e) + Ch(e, f, g) + k; |
| 31 | uint32_t t2 = 1U * Sigma0(a) + Maj(a, b, c); |
| 32 | *d = 1U * *d + t1; |
| 33 | *h = 1U * t1 + t2; |
| 34 | } |
| 35 | |
| 36 | /* Given a 256-bit 's' and a 512-bit 'chunk', then 's' becomes the value of the SHA-256 compression function ("added" to the original 's' value). |
| 37 | * |
no test coverage detected