IAuthenticatedEncryptor.Decrypt Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Validates the authentication tag of and decrypts a blob of encrypted data.
public:
cli::array <System::Byte> ^ Decrypt(ArraySegment<System::Byte> ciphertext, ArraySegment<System::Byte> additionalAuthenticatedData);
public byte[] Decrypt (ArraySegment<byte> ciphertext, ArraySegment<byte> additionalAuthenticatedData);
abstract member Decrypt : ArraySegment<byte> * ArraySegment<byte> -> byte[]
Public Function Decrypt (ciphertext As ArraySegment(Of Byte), additionalAuthenticatedData As ArraySegment(Of Byte)) As Byte()
Parameters
- ciphertext
- ArraySegment<Byte>
The ciphertext (including authentication tag) to decrypt.
- additionalAuthenticatedData
- ArraySegment<Byte>
Any ancillary data which was used during computation of the authentication tag. The same AAD must have been specified in the corresponding call to 'Encrypt'.
Returns
The original plaintext data (if the authentication tag was validated and decryption succeeded).
Remarks
All cryptography-related exceptions should be homogenized to CryptographicException.