Package functions description.
Public Methods
Function | Defined By | ||
---|---|---|---|
Generates a sequence of random bytes. | flash.crypto |
Function detail
generateRandomBytes | () | function |
public function generateRandomBytes(numberRandomBytes:uint):ByteArray
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 11, AIR 3 |
Generates a sequence of random bytes.
Use generateRandomBytes()
to generate cryptographic keys, strong identifiers,
session ids, and so on. The random sequence is generated using cryptographically strong functions provided
by the operating system. If the appropriate function is not available on an individual
client computer or device, then an error is thrown.
Parameters
numberRandomBytes:uint — the number random bytes to generate, between 1 and 1024.
|
ByteArray — a ByteArray containing the generated bytes.
|
Throws
Error — when the random bytes could not be generated.
|
Related API Elements
Wed Nov 21 2018, 06:59 AM -08:00