]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/streams/crypto/mcrypt/class_McryptStream.php
Continued:
[core.git] / framework / main / classes / streams / crypto / mcrypt / class_McryptStream.php
index 1a974893c8a91f20e24202bc41eea645f72b3692..e76806907168756aaed58666a04f4a5188596eb7 100644 (file)
@@ -66,7 +66,7 @@ class McryptStream extends BaseCryptoStream implements EncryptableStream {
         * @param       $key            Optional key, if none provided, a random key will be generated
         * @return      $encrypted      Encrypted string
         */
-       public function encryptStream ($str, $key = NULL) {
+       public function encryptStream (string $str, string $key = NULL) {
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MCRYPT-STREAM: key[' . gettype($key) . ']=' . $key);
 
@@ -133,7 +133,7 @@ class McryptStream extends BaseCryptoStream implements EncryptableStream {
         * @param       $key            Optional key, if none provided, a random key will be generated
         * @return      $str            The unencrypted string
         */
-       public function decryptStream ($encrypted, $key = NULL) {
+       public function decryptStream (string $encrypted, string $key = NULL) {
                // Init crypto module
                $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
                $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);