Update docs for Security::cipher()

This method is not cryptographically strong. Note that, and the
issues related to suhosin.

Related to #GH-1100
This commit is contained in:
mark_story 2013-05-06 23:03:20 -04:00
parent 43b77bc0b5
commit 06e7ba66c9

View file

@ -168,11 +168,19 @@ class Security {
}
/**
* Encrypts/Decrypts a text using the given key.
* Runs $text through a XOR cipher.
*
* *Note* This is not a cryptographically strong method and should not be used
* for sensitive data. Additionally this method does *not* work in environments
* where suhosin is enabled.
*
* Instead you should use Security::rijndael() when you need strong
* encryption.
*
* @param string $text Encrypted string to decrypt, normal string to encrypt
* @param string $key Key to use
* @return string Encrypted/Decrypted string
* @deprecated This method will be removed in 3.x
*/
public static function cipher($text, $key) {
if (empty($key)) {