blessing-skin-server/app/Services/Cipher/EncryptInterface.php

27 lines
487 B
PHP
Raw Normal View History

2016-07-21 22:01:57 +08:00
<?php
namespace App\Services\Cipher;
interface EncryptInterface
{
/**
* Encrypt given string with given salt.
2016-07-21 22:01:57 +08:00
*
2019-12-14 11:10:37 +08:00
* @param string $value
* @param string $salt
*
2017-01-08 10:48:46 +08:00
* @return string
2016-07-21 22:01:57 +08:00
*/
public function hash($value, $salt = '');
/**
* Verifies that the given hash matches the given password.
*
2019-12-14 11:10:37 +08:00
* @param string $password
* @param string $hash
*
* @return bool
*/
public function verify($password, $hash);
2016-07-21 22:01:57 +08:00
}