Decrypt Method
Decrypt(Byte[], Int32, Int32)
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 |
---|---|---|
System.Byte[] | ciphertext | The data to decrypt. |
System.Int32 | offset | The offset in |
System.Int32 | length | The number of bytes to decrypt. |
Returns
System.Byte[]
A new byte array containing the decrypted data.
Overrides
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.InvalidOperationException | The object has been created or initialized, but the Encapsulate(CoseKey) method has not been called. |
System.ArgumentException | The length of the |
Remarks
Note that this method will verify that the input buffer, offset, and length are valid.