CryptoSys PKI Toolkit Manual

Example: Rng.BytesWithPrompt  Rng.Strength 

[VB6 equivalent: RNG_BytesWithPrompt]

Dim abData() As Byte
Dim nDataLen As Integer

' Allocate byte array for 16 bytes
nDataLen = 16

' Default prompt with default 112-bit security strength
abData = Rng.BytesWithPrompt(nDataLen)
Console.WriteLine(Cnv.ToHex(abData))

' User-selected prompt with 128-bit security strength
abData = Rng.BytesWithPrompt(nDataLen, "Our own prompt: type until done...", Rng.Strength.Bits_128)
Console.WriteLine(Cnv.ToHex(abData))

See Also:
Rng.BytesWithPrompt Method (Int32)
Rng.BytesWithPrompt Method (Int32, String, Rng.Strength)

[Contents] [Index]

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

Copyright © 2004-12 D.I. Management Services Pty Ltd. All rights reserved.