Mega Code Archive

 
Categories / MySQL Tutorial / Encryption Compression Functions
 

ENCRYPT(str[,salt]) encrypts str using the Unix crypt() system call

Returns a binary string. The salt argument should be at least a two-character string. If no salt argument is given, a random value is used. mysql> mysql> SELECT ENCRYPT('hello'); +------------------+ | ENCRYPT('hello') | +------------------+ | NULL             | +------------------+ 1 row in set (0.01 sec) mysql>