Global object “crypto”
The global crypto
object provides an implementation of the RandomSource
interface that can be used to generate cryptographically secure random numbers.
Type: | Crypto extends Object |
Constructor: | private |
Singleton: | crypto |
Namespace: | global |
Direct subclasses: | None |
JSX Support: | No |
See also:
TS crypto.ts [► Run in Playground]
Methods
getRandomValues(typedArray)
Generates random numbers.
Parameter | Type | Description |
---|---|---|
typedArray | TypedArray |
A typed array which will be filled with random numbers. The same array is also returned by this method. |
Returns: TypedArray
Properties
subtle
Type: | SubtleCrypto |
Settable: | No |