-
<static> getPseudoRandom(from, to) → {Integer}
-
Return a pseudo-random number in the specified range
Parameters:
Name |
Type |
Description |
from |
Integer
|
Min of the random number |
to |
Integer
|
Max of the random number (max 32bit) |
- Source:
Returns:
A pseudo random number
-
Type
-
Integer
-
<static> getRandomBigInteger(bits) → {BigInteger}
-
Create a secure random big integer of bits length
Parameters:
Name |
Type |
Description |
bits |
Integer
|
Bit length of the MPI to create |
- Source:
Returns:
Resulting big integer
-
Type
-
BigInteger
-
<static> getRandomBytes(length) → {String}
-
Retrieve secure random byte string of the specified length
Parameters:
Name |
Type |
Description |
length |
Integer
|
Length in bytes to generate |
- Source:
Returns:
Random byte string
-
Type
-
String
-
<static> getRandomValues(buf)
-
Helper routine which calls platform specific crypto random generator
Parameters:
Name |
Type |
Description |
buf |
Uint32Array
|
|
- Source:
-
<static> getSecureRandom(from, to) → {Integer}
-
Return a secure random number in the specified range
Parameters:
Name |
Type |
Description |
from |
Integer
|
Min of the random number |
to |
Integer
|
Max of the random number (max 32bit) |
- Source:
Returns:
A secure random number
-
Type
-
Integer