public class SecureRandom extends Object:
Transport-safe secure random helper.
On this runtime branch, raw Byte[] generation is being finalized, so the public API exposes text encodings such as hexadecimal and Base64.
import klyn.cryptography random = SecureRandom() print(random.nextHex(16))
| Modifier and Type | Member | Description |
|---|---|---|
| public | SecureRandomSecureRandom(): |
Creates a secure random generator instance. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | nextBase64nextBase64(sizeBytes as Int) as String throws CryptoException: |
Generates random data encoded as standard Base64. |
| public | nextHexnextHex(sizeBytes as Int) as String throws CryptoException: |
Generates random data encoded as hexadecimal. |
| public | nextUrlBase64nextUrlBase64(sizeBytes as Int) as String throws CryptoException: |
Generates random data encoded as URL-safe Base64. |