SecureRandom
classin packageklyn.cryptography
public class SecureRandom extends Object:
Transport-safe secure random helper inspired by Java `SecureRandom`.
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))
Constructors
| Modifier and Type |
Member |
Description |
| public |
SecureRandom |
Creates a secure random generator instance. |
Methods
| Modifier and Type |
Member |
Description |
| public |
nextBase64 |
Generates random data encoded as standard Base64. |
| public |
nextHex |
Generates random data encoded as hexadecimal. |
| public |
nextUrlBase64 |
Generates random data encoded as URL-safe Base64. |