Skip to content

Commit f97baca

Browse files
authored
Add documentation to std.crypto.aes_gcm.AesGcm.encrypt (#24427)
1 parent 3974540 commit f97baca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/std/crypto/aes_gcm.zig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ fn AesGcm(comptime Aes: anytype) type {
2121

2222
const zeros = [_]u8{0} ** 16;
2323

24+
/// `c`: The ciphertext buffer to write the encrypted data to.
25+
/// `tag`: The authentication tag buffer to write the computed tag to.
26+
/// `m`: The plaintext message to encrypt.
27+
/// `ad`: The associated data to authenticate.
28+
/// `npub`: The nonce to use for encryption.
29+
/// `key`: The encryption key.
2430
pub fn encrypt(c: []u8, tag: *[tag_length]u8, m: []const u8, ad: []const u8, npub: [nonce_length]u8, key: [key_length]u8) void {
2531
debug.assert(c.len == m.len);
2632
debug.assert(m.len <= 16 * ((1 << 32) - 2));

0 commit comments

Comments
 (0)