Przeglądaj źródła

Adds type hinting for scalar types in ICrypto->decrypt

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
tags/v14.0.0beta1
Morris Jobke 6 lat temu
rodzic
commit
ca28df6fcc
No account linked to committer's email address

+ 1
- 1
lib/private/Security/Crypto.php Wyświetl plik

@@ -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');
}

+ 1
- 1
lib/public/Security/ICrypto.php Wyświetl plik

@@ -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;
}

Ładowanie…
Anuluj
Zapisz