Discuss this help topic in SecureBlackbox Forum

TElRandom.Randomize

TElRandom     See also     


Filter: C#/Java  VB.NET  Pascal  C++  PHP  


This method initializes the random number generator.

Declaration

[C#/Java]
    void Randomize(byte[] Seed);
    void Randomize(System.IO.Stream Stream, int Count);

[VB.NET]
    Sub Randomize(ByVal Seed As Byte())
    Sub Randomize(ByVal Stream As System.IO.Stream, ByVal Count As Integer)

[Pascal]
    procedure Randomize(Buffer : pointer; Count : integer);
    procedure Randomize(Stream : TStream; Count : integer = 0);
    procedure Randomize(Seed : string);

[C++]
    void Randomize(const std::vector<uint8_t> &Seed);
    void Randomize(TStream &Stream, int32_t Count);
    void Randomize(TStream *Stream, int32_t Count);
    void Randomize(void * Buffer, int32_t Count);

[PHP]
    void Randomize(array of byte|string|NULL $Seed)
    void Randomize(TStream $Stream, integer $Count)
    void Randomize(TSBPointer|array of byte|string|NULL $Buffer, integer $Count)

Parameters

  • Buffer - Buffer which contains any sequence of bytes
  • Count - Size of input data in bytes
  • Stream - Stream which contains any sequence of bytes
  • Seed - String which contains any sequence of characters

Description

    Use this method to initialize random number generator with seed. Call this method before calling Generate method.

As TElRandom output depends on initial seed, it is a good idea to initialize seed with random values, e.g. current time, current mouse coordinates etc.

See also:     Generate    

Discuss this help topic in SecureBlackbox Forum