crypt
| Format: crypt ( string [, salt]) |
Purpose: Calls the UNIX function for password encryption. This function does no encryption on Windows (see MD5() for an alternative). Parameters string and salt must be strings. For more information, read the manual page for the UNIX crypt function.
Return Values: Returns a string. On UNIX, the string contains the result of the UNIX crypt function. On Windows, the string contains the first 14 characters of string.
Platforms: UNIX systems only.
Example:
| resulting output: | |
<?crypt("Hello")> | xxAva79L2eoCI |
Tip: You should use this function before storing sensitive data such as a password into a database.
See Also: MD5()