SecureRandom
class in package klyn.cryptography

    public class SecureRandom extends Object:

Object
└ SecureRandom

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))

Properties inherited from Object: type
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | SecureRandom `SecureRandom():` | Creates a secure random generator instance.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | nextBase64 `nextBase64(sizeBytes as Int) as String throws CryptoException:` | Generates random data encoded as standard Base64.
public | nextHex `nextHex(sizeBytes as Int) as String throws CryptoException:` | Generates random data encoded as hexadecimal.
public | nextUrlBase64 `nextUrlBase64(sizeBytes as Int) as String throws CryptoException:` | Generates random data encoded as URL-safe Base64.

Methods inherited from Object: fromJson, toDict, toJson, toString, toXml