Decrypt Method
Decrypt(byte[], int, int)
Returns the AES-256-CBC decryption of ciphertext using an IV specified
by the protocol and the EncryptionKey. With protocol 1
the IV is all 00 bytes. With protocol 2, it is the first block size
bytes of ciphertext
.
C#
public override byte[] Decrypt(byte[] ciphertext, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
byte[] | ciphertext | The data to decrypt. |
int | offset | The offset in |
int | length | The number of bytes to decrypt. |
Returns
byte[]
A new byte array containing the decrypted data.
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
InvalidOperationException | The object has been created or initialized, but the Encapsulate(CoseKey) method has not been called. |
ArgumentException | The length of the |
Remarks
Note that this method will verify that the input buffer, offset, and length are valid.