password

PHP encryption symmetric program example using crypt to store password in a text file

| | |

Symmetric encryption is a type of encryption where the same key is used to encrypt and decrypt the message. Symmetric encryption differs from asymmetric (also known as public-key) encryption, which uses one key to encrypt a message and another to decrypt the message.

PHP crypt() will return an encrypted string using the standard Unix DES-based encryption algorithm or alternative algorithms that may be available on the system. Arguments are a string to be encrypted and an optional salt string to base the encryption on. See the Unix man page for your crypt function for more information.

Syndicate content