@@ -4,36 +4,57 @@ const loaderUtils = require("../");
4
4
5
5
describe ( "getHashDigest()" , ( ) => {
6
6
[
7
+ [ "test string" , "xxhash64" , "hex" , undefined , "e9e2c351e3c6b198" ] ,
8
+ [ "test string" , "xxhash64" , "base64" , undefined , "6eLDUePGsZg=" ] ,
9
+ [ "test string" , "xxhash64" , "base52" , undefined , "byfYGDmnmyUr" ] ,
10
+ [ "abc\\0♥" , "xxhash64" , "hex" , undefined , "4b9a34297dc03d20" ] ,
11
+ [ "abc\\0💩" , "xxhash64" , "hex" , undefined , "86733ec125b93904" ] ,
12
+ [ "abc\\0💩" , "xxhash64" , "base64" , undefined , "hnM+wSW5OQQ=" ] ,
13
+ [ "abc\\0♥" , "xxhash64" , "base64" , undefined , "S5o0KX3APSA=" ] ,
14
+ [ "abc\\0💩" , "xxhash64" , "base52" , undefined , "cfByjQcJZIU" ] ,
15
+ [ "abc\\0♥" , "xxhash64" , "base52" , undefined , "qdLyAQjLlod" ] ,
16
+
17
+ [ "test string" , "md4" , "hex" , 4 , "2e06" ] ,
18
+ [ "test string" , "md4" , "base64" , undefined , "Lgbt1PFiMmjFpRcw2KCyrw==" ] ,
19
+ [ "test string" , "md4" , "base52" , undefined , "egWqIKxsDHdZTteemJqXfuo" ] ,
20
+ [ "abc\\0♥" , "md4" , "hex" , undefined , "46b9627fecf49b80eaf01c01d86ae9fd" ] ,
21
+ [ "abc\\0💩" , "md4" , "hex" , undefined , "45aa5b332f8e562aaf0106ad6fc1d78f" ] ,
22
+ [ "abc\\0💩" , "md4" , "base64" , undefined , "RapbMy+OViqvAQatb8HXjw==" ] ,
23
+ [ "abc\\0♥" , "md4" , "base64" , undefined , "Rrlif+z0m4Dq8BwB2Grp/Q==" ] ,
24
+ [ "abc\\0💩" , "md4" , "base52" , undefined , "dtXZENFEkYHXGxOkJbevPoD" ] ,
25
+ [ "abc\\0♥" , "md4" , "base52" , undefined , "fYFFcfXRGsVweukHKlPayHs" ] ,
26
+
27
+ [ "test string" , "md5" , "hex" , 4 , "6f8d" ] ,
7
28
[
8
29
"test string" ,
9
30
"md5" ,
10
31
"hex" ,
11
32
undefined ,
12
33
"6f8db599de986fab7a21625b7916589c" ,
13
34
] ,
14
- [ "test string" , "md5" , "base64" , undefined , "2sm1pVmS8xuGJLCdWpJoRL" ] ,
15
- // ["test string", "md5", "base64url", undefined, "b421md6Yb6t6IWJbeRZYnA"],
16
- [ "test string" , "xxhash64" , "hex" , undefined , "e9e2c351e3c6b198" ] ,
17
- [ "test string" , "xxhash64" , "base64" , undefined , "9yNNKdhM-bF" ] ,
18
- [ "test string" , "xxhash64" , "base52" , undefined , "byfYGDmnmyUr" ] ,
19
- // ["test string", "xxhash64", "base64url", undefined, "6eLDUePGsZg"],
20
- [ "test string" , "md4" , "hex" , 4 , "2e06" ] ,
21
- [ "test string" , "md5" , "hex" , 4 , "6f8d" ] ,
22
35
[ "test string" , "md5" , "base52" , undefined , "dJnldHSAutqUacjgfBQGLQx" ] ,
36
+ [ "test string" , "md5" , "base64" , undefined , "b421md6Yb6t6IWJbeRZYnA==" ] ,
23
37
[ "test string" , "md5" , "base26" , 6 , "bhtsgu" ] ,
38
+ [ "abc\\0♥" , "md5" , "hex" , undefined , "2e897b64f8050e66aff98d38f7a012c5" ] ,
39
+ [ "abc\\0💩" , "md5" , "hex" , undefined , "63ad5b3d675c5890e0c01ed339ba0187" ] ,
40
+ [ "abc\\0💩" , "md5" , "base64" , undefined , "Y61bPWdcWJDgwB7TOboBhw==" ] ,
41
+ [ "abc\\0♥" , "md5" , "base64" , undefined , "Lol7ZPgFDmav+Y0496ASxQ==" ] ,
42
+ [ "abc\\0💩" , "md5" , "base52" , undefined , "djhVWGHaUKUxqxEhcTnOfBx" ] ,
43
+ [ "abc\\0♥" , "md5" , "base52" , undefined , "eHeasSeRyOnorzxUJpayzJc" ] ,
44
+
24
45
[
25
46
"test string" ,
26
47
"sha512" ,
27
48
"base64" ,
28
49
undefined ,
29
- "2IS-kbfIPnVflXb9CzgoNESGCkvkb0urMmucPD9z8q6HuYz8RShY1-tzSUpm5-Ivx_u4H1MEzPgAhyhaZ7RKog " ,
50
+ "EObWR69EYkRC84jCwUp4f/ixfmFluD12fsBHdo2MvLcaGjIm58x4Frx5wEJ9lKnaaIxBo5kse/Xk18w+C+XbrA== " ,
30
51
] ,
31
52
[
32
53
"test string" ,
33
- "md5 " ,
54
+ "sha512 " ,
34
55
"hex" ,
35
56
undefined ,
36
- "6f8db599de986fab7a21625b7916589c " ,
57
+ "10e6d647af44624442f388c2c14a787ff8b17e6165b83d767ec047768d8cbcb71a1a3226e7cc7816bc79c0427d94a9da688c41a3992c7bf5e4d7cc3e0be5dbac " ,
37
58
] ,
38
59
] . forEach ( ( test ) => {
39
60
it (
0 commit comments