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

23 lines
375 B
PHP
Raw Normal View History

<?php
namespace App\Services\Cipher;
abstract class BaseCipher implements EncryptInterface
{
/**
* {@inheritdoc}
*/
public function hash($value, $salt = '')
{
//
}
/**
* {@inheritdoc}
*/
public function verify($password, $hash, $salt = '')
{
2017-01-08 13:44:03 +08:00
return hash_equals($hash, $this->hash($password, $salt));
}
}