]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/streams/crypto/null/class_NullCryptoStream.php
Continued:
[core.git] / framework / main / classes / streams / crypto / null / class_NullCryptoStream.php
index 38337ba537c342cb896f6e3da5287ff5054d7efc..4e6908d9aebe6ae4efc9d82ff925717966840e20 100644 (file)
@@ -58,29 +58,24 @@ class NullCryptoStream extends BaseCryptoStream implements EncryptableStream {
         * Encrypt the string with fixed salt
         *
         * @param       $str            The unencrypted string
-        * @param       $key            Optional key, if none provided, a random key will be generated
+        * @param       $key            Ignored
         * @return      $encrypted      Encrypted string
         */
-       public function encryptStream ($str, $key = NULL) {
-               // Just handle it over
-               $encrypted = (string) $str;
-
+       public function encryptStream (string $str, string $key = NULL) {
                // Return it
-               return $encrypted;
+               return $str;
        }
 
        /**
         * Decrypt the string with fixed salt
         *
         * @param       $encrypted      Encrypted string
+        * @param       $key            Ignored
         * @return      $str            The unencrypted string
         */
-       public function decryptStream ($encrypted) {
-               // Just handle it over
-               $str = (string) $encrypted;
-
+       public function decryptStream (string $encrypted, string $key = NULL) {
                // Return it
-               return $str;
+               return $encrypted;
        }
 
        /**