Beryl::Crypto::V1::SecureHashWith32BitWords
Inherits Beryl::Crypto::V1::BlockHashFunction < Digest < Reference < Object
The SHA-2 compression function on 32-bit words (FIPS 180-4 §6.2), shared by SHA-224 and SHA-256, which differ only in their initial state and in how much of the final state they output.
Constants
BLOCK_SIZE = 64
The number of bytes the compression function consumes per step.
ROUND_CONSTANTS = {1116352408_u32, 1899447441_u32, 3049323471_u32, 3921009573_u32, 961987163_u32, 1508970993_u32, 2453635748_u32, 2870763221_u32, 3624381080_u32, 310598401_u32, 607225278_u32, 1426881987_u32, 1925078388_u32, 2162078206_u32, 2614888103_u32, 3248222580_u32, 3835390401_u32, 4022224774_u32, 264347078_u32, 604807628_u32, 770255983_u32, 1249150122_u32, 1555081692_u32, 1996064986_u32, 2554220882_u32, 2821834349_u32, 2952996808_u32, 3210313671_u32, 3336571891_u32, 3584528711_u32, 113926993_u32, 338241895_u32, 666307205_u32, 773529912_u32, 1294757372_u32, 1396182291_u32, 1695183700_u32, 1986661051_u32, 2177026350_u32, 2456956037_u32, 2730485921_u32, 2820302411_u32, 3259730800_u32, 3345764771_u32, 3516065817_u32, 3600352804_u32, 4094571909_u32, 275423344_u32, 430227734_u32, 506948616_u32, 659060556_u32, 883997877_u32, 958139571_u32, 1322822218_u32, 1537002063_u32, 1747873779_u32, 1955562222_u32, 2024104815_u32, 2227730452_u32, 2361852424_u32, 2428436474_u32, 2756734187_u32, 3204031479_u32, 3329325298_u32}
The sixty-four round constants of FIPS 180-4 §4.2.2.