Hasher.php 949 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace Illuminate\Contracts\Hashing;
  3. interface Hasher
  4. {
  5. /**
  6. * Get information about the given hashed value.
  7. *
  8. * @param string $hashedValue
  9. * @return array
  10. */
  11. public function info($hashedValue);
  12. /**
  13. * Hash the given value.
  14. *
  15. * @param string $value
  16. * @param array $options
  17. * @return string
  18. */
  19. public function make($value, array $options = []);
  20. /**
  21. * Check the given plain value against a hash.
  22. *
  23. * @param string $value
  24. * @param string $hashedValue
  25. * @param array $options
  26. * @return bool
  27. */
  28. public function check($value, $hashedValue, array $options = []);
  29. /**
  30. * Check if the given hash has been hashed using the given options.
  31. *
  32. * @param string $hashedValue
  33. * @param array $options
  34. * @return bool
  35. */
  36. public function needsRehash($hashedValue, array $options = []);
  37. }