PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / src / component / altcha / Hasher / hasher-interface.php

hasher-interface.php in Defender Security – Malware Scanner, Login Security & Firewall 6.3.0, at src/component/altcha/Hasher/hasher-interface.php

53 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The interface for hasher class.
4 *
5 * @package WP_Defender\Component\Altcha\Hasher
6 */
7
8 namespace WP_Defender\Component\Altcha\Hasher;
9
10 interface HasherInterface {
11 /**
12 * Hashes the given data using the specified algorithm.
13 *
14 * @param string $algorithm The hashing algorithm to use.
15 * @param string $data The data to hash.
16 *
17 * @return string The hashed data.
18 */
19 public function hash( string $algorithm, string $data ): string;
20
21 /**
22 * Hashes the given data using the specified algorithm and returns the hash in hexadecimal format.
23 *
24 * @param string $algorithm The hashing algorithm to use.
25 * @param string $data The data to hash.
26 *
27 * @return string The hashed data in hexadecimal format.
28 */
29 public function hash_hex( string $algorithm, string $data ): string;
30
31 /**
32 * Hashes the given data using HMAC with the specified algorithm and HMAC key.
33 *
34 * @param string $algorithm The hashing algorithm to use.
35 * @param string $data The data to hash.
36 * @param string $hmac_key The HMAC key to use.
37 *
38 * @return string The HMAC hashed data.
39 */
40 public function hash_hmac( string $algorithm, string $data, string $hmac_key ): string;
41
42 /**
43 * Hashes the given data using HMAC with the specified algorithm and HMAC key, returning the hash in hexadecimal format.
44 *
45 * @param string $algorithm The hashing algorithm to use.
46 * @param string $data The data to hash.
47 * @param string $hmac_key The HMAC key to use.
48 *
49 * @return string The HMAC hashed data in hexadecimal format.
50 */
51 public function hash_hmac_hex( string $algorithm, string $data, string $hmac_key ): string;
52 }
53