1 | <?php |
||
12 | class Hash implements Processor |
||
13 | { |
||
14 | use Processor\Implementation; |
||
15 | |||
16 | /** |
||
17 | * Apply processing to a single node |
||
18 | * |
||
19 | * @param Node $node |
||
20 | */ |
||
21 | 10 | public function applyToNode(Node $node) |
|
42 | |||
43 | |||
44 | /** |
||
45 | * md5 hash |
||
46 | * |
||
47 | * @param string $input |
||
48 | * @param string $hmac |
||
49 | */ |
||
50 | 2 | public function md5($input, $hmac = null) |
|
56 | |||
57 | /** |
||
58 | * sha1 hash |
||
59 | * |
||
60 | * @param string $input |
||
61 | * @param string $hmac |
||
62 | */ |
||
63 | 2 | public function sha1($input, $hmac = null) |
|
69 | |||
70 | /** |
||
71 | * sha256 hash |
||
72 | * |
||
73 | * @param string $input |
||
74 | * @param string $hmac |
||
75 | */ |
||
76 | 2 | public function sha256($input, $hmac = null) |
|
82 | |||
83 | /** |
||
84 | * sha512 hash |
||
85 | * |
||
86 | * @param string $input |
||
87 | * @param string $hmac |
||
88 | */ |
||
89 | 2 | public function sha512($input, $hmac = null) |
|
95 | |||
96 | /** |
||
97 | * crc32 hash |
||
98 | * |
||
99 | * @param string $input |
||
100 | * @param string $hmac |
||
101 | */ |
||
102 | 2 | public function crc32($input, $hmac = null) |
|
108 | } |
||
109 |