random.generateBytes(options)
The content in this help topic pertains to SuiteScript 2.1.
Method Description |
Cryptographically strong pseudorandom data. |
Returns |
Uint8Array |
Supported Script Types |
Client and server scripts For additional information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Since |
2023.1 |
Parameters
Parameter |
Type |
Required / Optional |
Description |
|
number |
required |
The number of bytes to generate; between 1b and 512b. |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/crypto/random Samples.
// Add additional code
...
// generate 5 random bytes of data
var bytes = random.generateBytes({size: 5});
...
//Add additional code