CryptoSys PKI .NET Class Library

Cipher.KeyUnwrap Method 

Unwraps (decrypts) key material with a key-encryption key

[Visual Basic]
Public Shared Function KeyUnwrap( _
   ByVal data As Byte(), _
   ByVal kek As Byte(), _
   ByVal cipherAlg As CipherAlgorithm _
) As Byte()
[C#]
public static byte[] KeyUnwrap(
   byte[] data,
   byte[] kek,
   CipherAlgorithm cipherAlg
);

Parameters

data
Wrapped key
kek
Key encryption key
cipherAlg
Block cipher to use for wrapping

Return Value

Unwrapped key material (or empty array on error)

See Also

Cipher Class | CryptoSysPKI Namespace