Cryptographically secure random bytes and printable text. More...
Classes | |
| class | Exception |
| Invalid random request or provider failure under StormByte.Crypto.Random. More... | |
Functions | |
| Safe::SecureBinary | Bytes (ByteSize count) |
| Generate exactly the requested number of random octets. | |
| Safe::String | Text (Size count) |
| Generate uniformly distributed printable ASCII characters. | |
Cryptographically secure random bytes and printable text.
Calls use the existing per-thread cryptographic generator. Bytes use auto-wiped secure storage; Text returns ordinary, non-wiped text.
| Safe::SecureBinary StormByte::Crypto::Random::Bytes | ( | ByteSize | count | ) |
Generate exactly the requested number of random octets.
| count | Number of bytes. Must be greater than zero. |
| Exception | The count is zero or the cryptographic provider failed. |
| Safe::String StormByte::Crypto::Random::Text | ( | Size | count | ) |
Generate uniformly distributed printable ASCII characters.
| count | Number of characters. Must be greater than zero. |
count characters in ASCII 33 through 126 inclusive (no spaces or embedded NUL). | Exception | The count is zero or the cryptographic provider failed. |