klyn.cryptography.SecureRandom.nextBase64
method

    public nextBase64(sizeBytes as Int) as String throws CryptoException:

Description

Generates random data encoded as standard Base64.

Parameters

Parameter | Description
--- | ---
`sizeBytes` | Number of random bytes to generate.

Returns

Standard Base64 text.

Throws

- CryptoException when generation fails.

Example

    import klyn.cryptography

    random = SecureRandom()
    print(random.nextBase64(16))