diff --git a/lib/private/Security/Crypto.php b/lib/private/Security/Crypto.php index 1dd680ea13..d2be148427 100644 --- a/lib/private/Security/Crypto.php +++ b/lib/private/Security/Crypto.php @@ -108,7 +108,7 @@ class Crypto implements ICrypto { * @return string plaintext * @throws \Exception If the HMAC does not match */ - public function decrypt($authenticatedCiphertext, $password = '') { + public function decrypt(string $authenticatedCiphertext, string $password = ''): string { if($password === '') { $password = $this->config->getSystemValue('secret'); } diff --git a/lib/public/Security/ICrypto.php b/lib/public/Security/ICrypto.php index 0de2e47b75..aa2b9eed2c 100644 --- a/lib/public/Security/ICrypto.php +++ b/lib/public/Security/ICrypto.php @@ -61,5 +61,5 @@ interface ICrypto { * @throws \Exception If the HMAC does not match * @since 8.0.0 */ - public function decrypt($authenticatedCiphertext, $password = ''); + public function decrypt(string $authenticatedCiphertext, string $password = ''): string; }