shaCrypt takes a string of data and applies several functions to scramble the data. Then it uses an SHA1 has of the key to encrypt the scrambled data by using the XOR function.
The SHA1 hash of the key can also be used to decrypt the encrypted data. Then it unscrambles the data using functions that invert the result of the original data scrambling.
PHP 4.2 or higher