| ... | ... | @@ -20,7 +20,7 @@ pub const Shake256 = Shake(256); |
| 20 | 20 | |
| 21 | 21 | /// TurboSHAKE128 is a XOF (a secure hash function with a variable output length), with a 128 bit security level. |
| 22 | 22 | /// It is based on the same permutation as SHA3 and SHAKE128, but which much higher performance. |
| 23 | | /// The delimiter is 0x01 by default, but can be changed for context-separation. |
| 23 | /// The delimiter is 0x1f by default, but can be changed for context-separation. |
| 24 | 24 | pub fn TurboShake128(comptime delim: ?u8) type { |
| 25 | 25 | return TurboShake(128, delim); |
| 26 | 26 | } |
| ... | ... | @@ -96,7 +96,7 @@ pub fn Shake(comptime security_level: u11) type { |
| 96 | 96 | /// The TurboSHAKE extendable output hash function. |
| 97 | 97 | /// https://datatracker.ietf.org/doc/draft-irtf-cfrg-kangarootwelve/ |
| 98 | 98 | pub fn TurboShake(comptime security_level: u11, comptime delim: ?u8) type { |
| 99 | | return ShakeLike(security_level, delim orelse 0x01, 12); |
| 99 | return ShakeLike(security_level, delim orelse 0x1f, 12); |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | fn ShakeLike(comptime security_level: u11, comptime delim: u8, comptime rounds: u5) type { |