Home Contents | # cipher.salt | Cipher | Core4 Lua Commands

## SYNOPSIS

salt = cipher.salt([length])

## DESCRIPTION

Generate a random salt for use with the cipher.crypt() function. The salt is prefixed by the string "$1$". By default it contains eight characters, but the optional length parameter can change this.

## RETURN VALUE

A string containing a new random salt.

## SEE ALSO

cipher.crypt(), Salt (Cryptography)