Skip to content

Typo in XChaChaIETF.stream() #20398

Closed
@r4gus

Description

Zig Version

>= 0.12.0

Steps to Reproduce and Observed Behavior

Application doesn't compile when using XChaChaIETF(N).stream().

src/chacha.zig:257:34: error: expected 5 argument(s), found 4
            ChaChaIETF(rounds_nb).xor(out, counter, extended.key, extended.nonce);
            ~~~~~~~~~~~~~~~~~~~~~^~~~
src/chacha.zig:211:13: note: function declared here
        pub fn xor(out: []u8, in: []const u8, counter: u32, key: [key_length]u8, nonce: [nonce_length]u8) void {
        ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expected Behavior

The application compiles.

The problem is a typo. XChaChaIETF.stream() should call ChaChaIETF.stream() instead of ChaChaIETF.xor().

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorstandard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions