12345678module juptune.crypto.aead;
Result decrypt(
ubyte[] cipherText,
ubyte[] additionalData,
SecureMemory. outPlainText,
SecureMemory. outPlainTextSlice
);
Decrypts the given cipherTextinto the outPlainTextbuffer, using the given additionalDatato calculate the authentication tag, and returns a slice outPlainTextwhich contains the final decrypted plaintext.
cipherTextmust be at least AeadAlgorithmT.ABYTESin length. Where ABYTES is typically the length of the authentication tag.
outPlainTextmust be at least cipherText.length - AeadAlgorithmT.ABYTESin length.
This is a "combined" AEAD decryption, where the authentication tag is assumed to be appended to the ciphertext.
Anything that AeadAlgorithmT.decryptthrows.
A Resultthat indicates if the decryption was successful or not.