Skip to content

TypeScript API / laikacms/crypto / generateSecureRandomHex

Function: generateSecureRandomHex() ​

ts
function generateSecureRandomHex(length): string;

Generate a cryptographically secure random hex string.

Parameters ​

ParameterTypeDescription
lengthnumberDesired length of the output string (in hex characters)

Returns ​

string

Cryptographically secure hex string

Released under the MIT License.