+ Encryption
+
+
+
+ in package
+
+
+
+
+
+
+
+
+ Encryption handling.
+ + + ++ Tags + +
+ + + + + + + ++ Table of Contents + +
+ +-
+
- + createIV() + + : string + +
- Create an IV (Initialization Vector) string. + +
- + decrypt() + + : string + + + +
- + encrypt() + + : array<string|int, mixed> + +
- Encrypts string with encryption algorithm specified in config + +
+ Methods + +
++ createIV() + +
+ + +Create an IV (Initialization Vector) string.
+ +
+ public
+ static createIV(string $cipher) : string
+
+ IV contains of random data from a "random" source. In this case the source is OPENSSL.
+Parameters
+-
+
- + $cipher + : string + +
-
+
+ +Encryption method to use.
+
+
+ Tags + +
+ + +Return values
+ string + — +Returns an IV string encoded with base64.
++ decrypt() + +
+ + + +
+ public
+ static decrypt(array<string|int, mixed> $input, string $password) : string
+
+
+ Parameters
+-
+
- + $input + : array<string|int, mixed> + +
-
+
+ +Encrypted data to decrypt.
+
+ - + $password + : string + +
-
+
+ +Plain text decryption password.
+
+
+ Tags + +
+ + +Return values
+ string + — +Returns decrypted data in the form of a clear text string.
++ encrypt() + +
+ + +Encrypts string with encryption algorithm specified in config
+ +
+ public
+ static encrypt(string $input, string $password) : array<string|int, mixed>
+
+
+ Parameters
+-
+
- + $input + : string + +
-
+
+ +Input data to encrypt.
+
+ - + $password + : string + +
-
+
+ +Plain text password.
+
+
+ Tags + +
+ + +Return values
+ array<string|int, mixed> + — +Array containing encrypted version of $input.
+