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

Inherited Properties
property Inherited Properties 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.

Inherited Methods
method Inherited Methods from Object: deepCopy, fromJson, toDict, toJson, toString, toXml