Added parameter 'key' to encryption methods to allow own keys
[core.git] / inc / classes / interfaces / streams / crypto / class_EncryptableStream.php
index 81d4861a5033587a6c09dd9e3e78b0a57f3b21d4..d40e19158bc36c414c78694c549104bc86ddd727 100644 (file)
@@ -26,9 +26,10 @@ interface EncryptableStream extends Streamable {
         * 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 encryptStream ($str);
+       function encryptStream ($str, $key = null);
 
        /**
         * Decrypt the string with fixed salt