Discuss this help topic in SecureBlackbox Forum


TElRandom     See also     

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

This method initializes the random number generator.


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

    Sub Randomize(ByVal Seed As Byte())
    Sub Randomize(ByVal Stream As System.IO.Stream, ByVal Count As Integer)

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

    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);

    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)

    void randomize(byte[] Seed);
    void randomize(TElStream Stream, int Count);


  • 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


    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