* @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);
* @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);