# Package flash.crypto

Package functions description.
Public Methods

| Function | Defined By
--- | --- | ---
|  | generateRandomBytes(numberRandomBytes:uint):ByteArray 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.

Returns

| `ByteArray` — a ByteArray containing the generated bytes.

Throws

| `Error` — when the random bytes could not be generated.

Related API Elements

Math.random()

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 01:40 PM -07:00