CryptoSys PKI Pro Manual

Example: Cipher.KeyUnwrap 

[VB6 equivalent: CIPHER_KeyUnwrap]

Dim abWK() As Byte
Dim abKeyData() As Byte
Dim abKek() As Byte

abWK = Cnv.FromHex("503D75C73630A7B02ECF51B9B29B907749310B77B0B2E054")
abKek = Cnv.FromHex("c17a44e8 e28d7d64 81d1ddd5 0a3b8914")

abKeyData = Cipher.KeyUnwrap(abWK, abKek, CipherAlgorithm.Aes128)
If abKeyData.Length = 0 Then
    Console.WriteLine("Cipher.KeyUnwrap: " & General.LastError())
    Exit Sub
End If
Console.WriteLine("K=" & Cnv.ToHex(abKeyData))

See Also:
Cipher.KeyUnwrap Method

[Contents] [Index]

[PREV: Example: Cipher.KeyWrap ...]   [Contents]   [Index]   
   [NEXT: Example: Cms.GetSigDataDigest ...]

Copyright © 2004-23 D.I. Management Services Pty Ltd. All rights reserved. Generated 2023-09-18T10:02:53Z.