CryptoSys PKI Pro 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]

[PREV: Example: Rng.Bytes ...]   [Contents]   [Index]   
   [NEXT: Example: Rng.Bytes ...]

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