nupp.random.spi
Implementation interfaces consumed during ordinary module initialization. Discover with nupp.spi.load; the consumer chooses the unique highest priority. Omitted priority is zero. Importing these declarations loads no implementation.
Module contents
Types
| Type | Kind | Description |
|---|---|---|
Provider | interface | Cryptographically secure randomness for the executing host. |
Types#
Providerinterface#
interface Provider ...Cryptographically secure randomness for the executing host.
Use the host secure random source and propagate its failures. Deterministic pseudo-random generators do not satisfy this contract. Host requests may suspend.
Members
| Name | Kind | Description |
|---|---|---|
priority | field | |
randomBytes | method | Returns exactly count random bytes. |
randomBytesmethod#
randomBytes: function(count: integer): string@readonly
Returns exactly count random bytes. Accepts integers from zero through 1048576; zero returns an empty string. Raises on invalid counts or failure.
Arguments
| Name | Type | Description |
|---|---|---|
count | integer |
Returns
| Type | Description |
|---|---|
string |