CryptoSys PKI Pro Manual

Cipher.KeyWrap Method

Wrap (encrypt) key material with a key-encryption key.

Syntax

[C#]
public static byte[] KeyWrap(
   byte[] data,
   byte[] kek,
   CipherAlgorithm cipherAlg 
)
[VB]
Public Shared Function KeyWrap (
   data As Byte(),
   kek As Byte(),
   cipherAlg As CipherAlgorithm 
) As Byte()

Parameters

data  Byte
Key material to be wrapped
kek  Byte
Key encryption key
cipherAlg  CipherAlgorithm
Block cipher to use for wrapping

Return Value

Byte
Wrapped key (or empty array on error)

See Also

VB6/C equivalent: CIPHER_KeyWrap

[Contents] [Index]

[PREV: Cipher.KeyUnwrap Method...]   [Contents]   [Index]   
   [NEXT: Cipher.Pad(Byte, CipherAlgorithm, Padding) Method...]

Copyright © 2004-26 D.I. Management Services Pty Ltd t/a CryptoSys. All rights reserved. Generated 2026-09-21T05:59:39Z.