fn open(m: []u8, c: []const u8, npub: [nonce_length]u8, k: [key_length]u8) AuthenticationError!void

Verify and decrypt c using a nonce npub and a key k. m must be exactly tag_length smaller than c, as c includes an authentication tag in addition to the encrypted message.

Parameters

m: []u8,
c: []const u8,
npub: [nonce_length]u8,
k: [key_length]u8,