@@ -4,36 +4,57 @@ const loaderUtils = require("../");
44
55describe ( "getHashDigest()" , ( ) => {
66 [
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" ] ,
728 [
829 "test string" ,
930 "md5" ,
1031 "hex" ,
1132 undefined ,
1233 "6f8db599de986fab7a21625b7916589c" ,
1334 ] ,
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" ] ,
2235 [ "test string" , "md5" , "base52" , undefined , "dJnldHSAutqUacjgfBQGLQx" ] ,
36+ [ "test string" , "md5" , "base64" , undefined , "b421md6Yb6t6IWJbeRZYnA==" ] ,
2337 [ "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+
2445 [
2546 "test string" ,
2647 "sha512" ,
2748 "base64" ,
2849 undefined ,
29- "2IS-kbfIPnVflXb9CzgoNESGCkvkb0urMmucPD9z8q6HuYz8RShY1-tzSUpm5-Ivx_u4H1MEzPgAhyhaZ7RKog " ,
50+ "EObWR69EYkRC84jCwUp4f/ixfmFluD12fsBHdo2MvLcaGjIm58x4Frx5wEJ9lKnaaIxBo5kse/Xk18w+C+XbrA== " ,
3051 ] ,
3152 [
3253 "test string" ,
33- "md5 " ,
54+ "sha512 " ,
3455 "hex" ,
3556 undefined ,
36- "6f8db599de986fab7a21625b7916589c " ,
57+ "10e6d647af44624442f388c2c14a787ff8b17e6165b83d767ec047768d8cbcb71a1a3226e7cc7816bc79c0427d94a9da688c41a3992c7bf5e4d7cc3e0be5dbac " ,
3758 ] ,
3859 ] . forEach ( ( test ) => {
3960 it (
0 commit comments