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

25 lines
477 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
*
2017-01-08 10:48:46 +08:00
* @param string $value
2016-07-21 22:01:57 +08:00
* @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.
*
* @param string $password
* @param string $hash
* @return bool
*/
public function verify($password, $hash);
2016-07-21 22:01:57 +08:00
}