CryptoSys API Library Manual

Example: Rng.KeyBytes 

[VB6 equivalent: RNG_KeyBytes]

Dim abKey() As Byte
Dim nKeyBytes As Integer
Dim i As Integer

nKeyBytes = 24
' Generate three successive 192-bit random keys with no seeding
For i = 1 To 3
    abKey = Rng.KeyBytes(nKeyBytes, "")
    Console.WriteLine(Cnv.ToHex(abKey))
Next

See Also:
Rng.KeyBytes Method (Int32, Byte[])
Rng.KeyBytes Method (Int32, String)

[Contents] [Index]

[PREV: Example: Rng.Initialize ...]   [Contents]   [Index]   
   [NEXT: Example: Rng.MakeSeedFile ...]

Copyright © 2001-23 D.I. Management Services Pty Ltd. All rights reserved. Generated 2023-05-20T13:01:10Z.