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]

[HOME]   [NEXT: Example: Rng.MakeSeedFile ...]

Copyright © 2001-11 D.I. Management Services Pty Ltd. All rights reserved.