module HashFunctions

Defined in:

hashes.cr

Constant Summary

CODES = NAMES.invert
LENGTHS = {17 => 20, 18 => 32, 19 => 64, 23 => 28, 22 => 32, 21 => 48, 20 => 64, 24 => 32, 25 => 64, 26 => 28, 27 => 32, 28 => 48, 29 => 64, 34 => 32, 45569 => 1, 45570 => 2, 45571 => 3, 45572 => 4, 45573 => 5, 45574 => 6, 45575 => 7, 45576 => 8, 45577 => 9, 45578 => 10, 45579 => 11, 45580 => 12, 45581 => 13, 45582 => 14, 45583 => 15, 45584 => 16, 45585 => 17, 45586 => 18, 45587 => 19, 45588 => 20, 45589 => 21, 45590 => 22, 45591 => 23, 45592 => 24, 45593 => 25, 45594 => 26, 45595 => 27, 45596 => 28, 45597 => 29, 45598 => 30, 45599 => 31, 45600 => 32, 45601 => 33, 45602 => 34, 45603 => 35, 45604 => 36, 45605 => 37, 45606 => 38, 45607 => 39, 45608 => 40, 45609 => 41, 45610 => 42, 45611 => 43, 45612 => 44, 45613 => 45, 45614 => 46, 45615 => 47, 45616 => 48, 45617 => 49, 45618 => 50, 45619 => 51, 45620 => 52, 45621 => 53, 45622 => 54, 45623 => 55, 45624 => 56, 45625 => 57, 45626 => 58, 45627 => 59, 45628 => 60, 45629 => 61, 45630 => 62, 45631 => 63, 45632 => 64, 45633 => 1, 45634 => 2, 45635 => 3, 45636 => 4, 45637 => 5, 45638 => 6, 45639 => 7, 45640 => 8, 45641 => 9, 45642 => 10, 45643 => 11, 45644 => 12, 45645 => 13, 45646 => 14, 45647 => 15, 45648 => 16, 45649 => 17, 45650 => 18, 45651 => 19, 45652 => 20, 45653 => 21, 45654 => 22, 45655 => 23, 45656 => 24, 45657 => 25, 45658 => 26, 45659 => 27, 45660 => 28, 45661 => 29, 45662 => 30, 45663 => 31, 45664 => 32}
NAMES = {:identity => 0, :sha1 => 17, :sha2_256 => 18, :sha2_512 => 19, :dbl_sha2_256 => 86, :sha3_224 => 23, :sha3_256 => 22, :sha3_384 => 21, :sha3_512 => 20, :shake_128 => 24, :shake_256 => 25, :keccak_224 => 26, :keccak_256 => 27, :keccak_384 => 28, :keccak_512 => 29, :murmur3 => 34, :blake2b_8 => 45569, :blake2b_16 => 45570, :blake2b_24 => 45571, :blake2b_32 => 45572, :blake2b_40 => 45573, :blake2b_48 => 45574, :blake2b_56 => 45575, :blake2b_64 => 45576, :blake2b_72 => 45577, :blake2b_80 => 45578, :blake2b_88 => 45579, :blake2b_96 => 45580, :blake2b_104 => 45581, :blake2b_112 => 45582, :blake2b_120 => 45583, :blake2b_128 => 45584, :blake2b_136 => 45585, :blake2b_144 => 45586, :blake2b_152 => 45587, :blake2b_160 => 45588, :blake2b_168 => 45589, :blake2b_176 => 45590, :blake2b_184 => 45591, :blake2b_192 => 45592, :blake2b_200 => 45593, :blake2b_208 => 45594, :blake2b_216 => 45595, :blake2b_224 => 45596, :blake2b_232 => 45597, :blake2b_240 => 45598, :blake2b_248 => 45599, :blake2b_256 => 45600, :blake2b_264 => 45601, :blake2b_272 => 45602, :blake2b_280 => 45603, :blake2b_288 => 45604, :blake2b_296 => 45605, :blake2b_304 => 45606, :blake2b_312 => 45607, :blake2b_320 => 45608, :blake2b_328 => 45609, :blake2b_336 => 45610, :blake2b_344 => 45611, :blake2b_352 => 45612, :blake2b_360 => 45613, :blake2b_368 => 45614, :blake2b_376 => 45615, :blake2b_384 => 45616, :blake2b_392 => 45617, :blake2b_400 => 45618, :blake2b_408 => 45619, :blake2b_416 => 45620, :blake2b_424 => 45621, :blake2b_432 => 45622, :blake2b_440 => 45623, :blake2b_448 => 45624, :blake2b_456 => 45625, :blake2b_464 => 45626, :blake2b_472 => 45627, :blake2b_480 => 45628, :blake2b_488 => 45629, :blake2b_496 => 45630, :blake2b_504 => 45631, :blake2b_512 => 45632, :blake2s_8 => 45633, :blake2s_16 => 45634, :blake2s_24 => 45635, :blake2s_32 => 45636, :blake2s_40 => 45637, :blake2s_48 => 45638, :blake2s_56 => 45639, :blake2s_64 => 45640, :blake2s_72 => 45641, :blake2s_80 => 45642, :blake2s_88 => 45643, :blake2s_96 => 45644, :blake2s_104 => 45645, :blake2s_112 => 45646, :blake2s_120 => 45647, :blake2s_128 => 45648, :blake2s_136 => 45649, :blake2s_144 => 45650, :blake2s_152 => 45651, :blake2s_160 => 45652, :blake2s_168 => 45653, :blake2s_176 => 45654, :blake2s_184 => 45655, :blake2s_192 => 45656, :blake2s_200 => 45657, :blake2s_208 => 45658, :blake2s_216 => 45659, :blake2s_224 => 45660, :blake2s_232 => 45661, :blake2s_240 => 45662, :blake2s_248 => 45663, :blake2s_256 => 45664}