<?php

namespace Slovocast\Infrastructure\User;

use Slovocast\Infrastructure\User\UserAuthorizationInterface;

/**
 * This empty class will essentially just check hashed passwords passed
 * into it using the default `password_` functions from PHP.
 */
class BasicUserAuthorization implements UserAuthorizationInterface
{
    public function hash(string $password): string
    {
        return password_hash($password, PASSWORD_BCRYPT);
    }

    public function verify(string $password, string $hash): bool 
    {
        return password_verify($password, $hash);
    }
}
