Added parameter 'key' to encryption methods to allow own keys
[core.git] / inc / classes / interfaces / crypto / class_Cryptable.php
index d9556834e1807a232e20c4dee795379b73c49a29..613f5057707dcd97590b998614fe5b7a0bd0689a 100644 (file)
@@ -38,9 +38,10 @@ interface Cryptable extends FrameworkInterface {
         * Encrypt the string with fixed salt
         *
         * @param       $str            The unencrypted string
+        * @param       $key            Optional key, if none provided, a random key will be generated
         * @return      $encrypted      Encrypted string
         */
-       function encryptString ($str);
+       function encryptString ($str, $key = null);
 
        /**
         * Decrypt the string with fixed salt