Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
Try to compile code that uses std.crypto.stream.chacha.ChaCha20With64BitNonce.stream:
counter parameter is u32 not u64
- As a result, you also get a compile error from std:
/usr/lib/zig/std/crypto/chacha20.zig:607:50: error: type 'u5' cannot represent integer value '32'
c[1] = @as(u32, @truncate(counter >> 32));
^~
Expected Behavior
ChaCha20With64BitNonce.stream should have counter: u64 parameter like .xor does
Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
Try to compile code that uses
std.crypto.stream.chacha.ChaCha20With64BitNonce.stream:counterparameter isu32notu64Expected Behavior
ChaCha20With64BitNonce.streamshould havecounter: u64parameter like.xordoes