Static methods help to encrypt and decrypt string. mCrypt is used if it is installed, else a basic algorithm is used.
| package |
jelix |
|---|---|
| subpackage |
utils |
| deprecated |
_getDefaultKey() : string
| author |
Hadrien Lanneau |
|---|---|
| Throws |
|
string
decrypt(string $string, string $key = '') : string
Use mCrypt if it is installed, else a basic algorithm.
stringthe string to decrypt
stringthe key used to decrypt. If not given, use the key indicated in the configuration
stringdecrypted string
encrypt(string $string, string $key = '') : string
Use mCrypt if it is installed, else a basic algorithm.
stringthe string to encrypt
stringthe key used to encrypt. If not given, use the key indicated in the configuration
stringencrypted string
mcryptDecrypt(string $string, string $key = '') : string
| Throws |
|
|---|
stringthe string to decrypt
stringthe key used to decrypt string. If not given, use the key indicated in the configuration
stringdecrypted string
mcryptEncrypt(string $string, string $key = '') : string
| Throws |
|
|---|
stringthe string to encrypt
stringthe key used to encrypt string. If not given, use the key indicated in the configuration
stringencrypted string
simpleCrypt(string $str, string $key = '') : string
| author |
halojoy |
|---|---|
| see | http://www.phpbuilder.com/board/showthread.php?t=10326721 |
| Throws |
|
stringthe string to encrypt/decrypt
stringthe key used to encrypt/decrypt string (must be >= 8 characters). If not given, use the key indicated in the configuration
stringencrypted/decrypted string