public class PRNG
extends java.lang.Object
A useful Singleton hash-based (SHA) pseudo-random number generator used throughout this library.
MDGenerator
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args) |
static void |
nextBytes(byte[] aBuffer)
Completely fills the designated
aBuffer with random data
generated by the underlying singleton. |
static void |
nextBytes(byte[] buffer,
int offset,
int length)
Fills the designated
buffer , starting from byte at
position offset with, at most, length bytes of
random data generated by the underlying singleton. |
static void |
nextBytesWithoutTRSU(byte[] buffer,
int offset,
int length) |
static void |
setDefaultPRNG() |
static void |
setKaynakUretimUzunluk(int uzunluk) |
static void |
setPRNG(tr.gov.tubitak.uekae.esya.api.common.crypto.IRandom aRandomGenerator) |
public static void setDefaultPRNG()
public static void setPRNG(tr.gov.tubitak.uekae.esya.api.common.crypto.IRandom aRandomGenerator)
public static void nextBytes(byte[] aBuffer)
Completely fills the designated aBuffer
with random data
generated by the underlying singleton.
aBuffer
- the place holder of random bytes generated by this PRNG
singleton. On output, the contents of aBuffer
are replaced
with pseudo-random data, iff the aBuffer
size is not zero.public static void nextBytesWithoutTRSU(byte[] buffer, int offset, int length)
public static void nextBytes(byte[] buffer, int offset, int length)
Fills the designated buffer
, starting from byte at
position offset
with, at most, length
bytes of
random data generated by the underlying singleton.
IRandom.nextBytes(byte[], int, int)
public static void setKaynakUretimUzunluk(int uzunluk)
public static void main(java.lang.String[] args)
Copyright © 2025. All rights reserved.