* @param $key Optional key, if none provided, a random key will be generated
* @return $encrypted Encrypted string
*/
- function encryptStream ($str, $key = NULL);
+ function encryptStream (string $str, string $key = NULL);
/**
* Decrypt the string with fixed salt
*
* @param $encrypted Encrypted string
+ * @param $key Optional key, if none provided, a random key will be generated
* @return $str The unencrypted string
*/
- function decryptStream ($encrypted);
+ function decryptStream (string $encrypted, string $key = NULL);
}