Fix for 'Couldnt figure out a password hash for {SSHA}' fixes #286

This commit is contained in:
Deon George 2025-02-04 08:28:27 +11:00
parent 13e645dde0
commit bbef155fd2
2 changed files with 10 additions and 0 deletions

View File

@ -10,4 +10,9 @@ final class SHA extends Base
{
return sprintf('{%s}%s',self::key,base64_encode(hash('sha1',$password,true)));
}
public static function subid(string $password): bool
{
return preg_match('/^{'.static::key.'}/',$password);
}
}

View File

@ -16,4 +16,9 @@ final class SSHA extends Base
{
return sprintf('{%s}%s',self::key,$this->salted_hash($password,'sha1',self::salt,$salt));
}
public static function subid(string $password): bool
{
return preg_match('/^{'.static::key.'}/',$password);
}
}