summaryrefslogtreecommitdiffstats
path: root/lib/public/Security/IHasher.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-01-16 20:28:22 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-01-16 22:01:19 +0100
commit0e0db3765887930682aadc6bc8ec7df5ffd187f6 (patch)
treef11f9ebd73638273d281cb6d635ba6069edefd9f /lib/public/Security/IHasher.php
parent2b70c708abc667c3e3c4fd9a97626012bf1ded25 (diff)
downloadnextcloud-server-0e0db3765887930682aadc6bc8ec7df5ffd187f6.tar.gz
nextcloud-server-0e0db3765887930682aadc6bc8ec7df5ffd187f6.zip
Make OCP\Security stricter
* Add typehints * Add return types * Opcode opts from phpstorm * Made strict * Fixed tests: No need to test bogus values anymore strict typing fixes this Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/public/Security/IHasher.php')
-rw-r--r--lib/public/Security/IHasher.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/public/Security/IHasher.php b/lib/public/Security/IHasher.php
index 11159cbc010..5942814802a 100644
--- a/lib/public/Security/IHasher.php
+++ b/lib/public/Security/IHasher.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
@@ -53,7 +54,7 @@ interface IHasher {
* @return string Hash of the message with appended version parameter
* @since 8.0.0
*/
- public function hash($message);
+ public function hash(string $message): string;
/**
* @param string $message Message to verify
@@ -62,5 +63,5 @@ interface IHasher {
* @return bool Whether $hash is a valid hash of $message
* @since 8.0.0
*/
- public function verify($message, $hash, &$newHash = null);
+ public function verify(string $message, string $hash, &$newHash = null): bool ;
}