decryptSecretBoxInPlace

Wrapper around crypto_secretbox_open_easy that decrypts in place. buffer is changed in place from the cipher to the decrypted message. If decryption is successful, true is returned and buffer is updated with the length of the decrypted message, which will be shorter than the cipher. Otherwise true will be returned.

bool
decryptSecretBoxInPlace
(
ref ubyte[] buffer
,
in Nonce nonce
,
in SecretKey key
)
in { assert (buffer.length > SecretMacLength); }

Meta