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