Function encrypt [src]
Prototype
pub fn encrypt(c: []u8, tag: *[tag_length]u8, m: []const u8, ad: []const u8, npub: [nonce_length]u8, key: [key_length]u8) void Parameters
c: []u8tag: *[tag_length]u8m: []const u8ad: []const u8npub: [nonce_length]u8key: [key_length]u8 Source
pub fn encrypt(c: []u8, tag: *[tag_length]u8, m: []const u8, ad: []const u8, npub: [nonce_length]u8, key: [key_length]u8) void {
xor(c, m, npub, key);
tag.* = mac(c, ad, npub, key);
}