klyn.cryptography.SecureRandom.nextHex
method

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

Description

Generates random data encoded as hexadecimal.

Parameters

- sizeBytes Number of random bytes to generate.

Returns

Lower-case hexadecimal text.

Throws

- CryptoException when generation fails. ```klyn import klyn.cryptography random = SecureRandom() print(random.nextHex(16)) ```