Function generateRandomSalt

  • Generates a random salt for key derivation.

    Parameters

    • bytes: number = 16

      The number of bytes for the generated salt. Default is 16 bytes.

    Returns string

    The generated salt as a hexadecimal string.

    Example

    const salt = generateRandomSalt();
    console.log(salt); // Random hexadecimal salt

Generated using TypeDoc