N/crypto/random Module
The N/crypto/random module is available for both client and server scripts, but server scripts need to use SuiteScript 2.1.
If you cannot update your server script code to SuiteScript 2.1, consider implementing a small RESTlet in SuiteScript 2.1 that uses N/crypto/random module and consuming it from your script with https.requestRestlet(options)
In This Help Topic
Use the N/crypto/random module to provide cryptographically-secure, pseudorandom generator methods.
N/crypto/random Module Members
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Method |
Uint8Array |
Client and server scripts |
Generates cryptographically strong pseudorandom set of bytes. |
|
number |
Client and server scripts |
Method used to generate cryptographically strong pseudorandom number. |
||
string |
Client and server scripts |
Method used to generate a v4 Universally Unique Identifier using a cryptographically secure random number generator. |