| ... | @@ -557,6 +557,8 @@ pub const SealedBox = struct { | ... | @@ -557,6 +557,8 @@ pub const SealedBox = struct { |
| 557 | const htest = @import("test.zig"); | 557 | const htest = @import("test.zig"); |
| 558 | | 558 | |
| 559 | test "(x)salsa20" { | 559 | test "(x)salsa20" { |
| | 560 | if (builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/24299 |
| | 561 | |
| 560 | const key = [_]u8{0x69} ** 32; | 562 | const key = [_]u8{0x69} ** 32; |
| 561 | const nonce = [_]u8{0x42} ** 8; | 563 | const nonce = [_]u8{0x42} ** 8; |
| 562 | const msg = [_]u8{0} ** 20; | 564 | const msg = [_]u8{0} ** 20; |
| ... | @@ -600,6 +602,8 @@ test "xsalsa20poly1305 secretbox" { | ... | @@ -600,6 +602,8 @@ test "xsalsa20poly1305 secretbox" { |
| 600 | } | 602 | } |
| 601 | | 603 | |
| 602 | test "xsalsa20poly1305 box" { | 604 | test "xsalsa20poly1305 box" { |
| | 605 | if (builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/24299 |
| | 606 | |
| 603 | var msg: [100]u8 = undefined; | 607 | var msg: [100]u8 = undefined; |
| 604 | var msg2: [msg.len]u8 = undefined; | 608 | var msg2: [msg.len]u8 = undefined; |
| 605 | var nonce: [Box.nonce_length]u8 = undefined; | 609 | var nonce: [Box.nonce_length]u8 = undefined; |
| ... | @@ -614,6 +618,8 @@ test "xsalsa20poly1305 box" { | ... | @@ -614,6 +618,8 @@ test "xsalsa20poly1305 box" { |
| 614 | } | 618 | } |
| 615 | | 619 | |
| 616 | test "xsalsa20poly1305 sealedbox" { | 620 | test "xsalsa20poly1305 sealedbox" { |
| | 621 | if (builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/24299 |
| | 622 | |
| 617 | var msg: [100]u8 = undefined; | 623 | var msg: [100]u8 = undefined; |
| 618 | var msg2: [msg.len]u8 = undefined; | 624 | var msg2: [msg.len]u8 = undefined; |
| 619 | var boxed: [msg.len + SealedBox.seal_length]u8 = undefined; | 625 | var boxed: [msg.len + SealedBox.seal_length]u8 = undefined; |