summaryrefslogtreecommitdiffstats
path: root/user_guide
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide')
-rw-r--r--user_guide/libraries/encryption.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/user_guide/libraries/encryption.html b/user_guide/libraries/encryption.html
index ef941d5b7..124b64793 100644
--- a/user_guide/libraries/encryption.html
+++ b/user_guide/libraries/encryption.html
@@ -132,6 +132,14 @@ $encrypted_string = 'APANtByIGI1BpVXZTJgcsAG8GZl8pdwwa84';<br />
<br />
$plaintext_string = $this->encrypt->decode($encrypted_string);</code>
+<p>You can optionally pass your encryption key via the second parameter if you don't want to use the one in your config file:</p>
+
+<code>
+$msg = 'My secret message';<br />
+$key = 'super-secret-key';<br />
+<br />
+$encrypted_string = $this->encrypt->decode($msg, $key);</code>
+
<h2>$this->encrypt->set_cipher();</h2>