rapidhash-js 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.0.0] - 2025-11-24
4
+
5
+ - Implement [rapidhash v3.0](https://github.com/Nicoshev/rapidhash).
6
+ - Add `rapidhashMicro` and `rapidhashNano` variants (v3.0 only).
7
+ - Add version-specific entry points: `rapidhash-js/v1.0`, `rapidhash-js/v2.0`, `rapidhash-js/v2.2`, and `rapidhash-js/v3.0`.
8
+ - **Breaking:** The functions `rapidhash()`, `rapidhash_fast()`, and `rapidhash_protected()` are now implemented with the v3.0 algorithm. To use v2.2, import from `rapidhash-js/v2.2`.
9
+
10
+ ## [2.2.0] - 2025-05-29
11
+
12
+ - Implement [rapidhash v2.2](https://github.com/Nicoshev/rapidhash/pull/23).
13
+ - **Breaking:** The functions `rapidhash()`, `rapidhash_fast()`, and `rapidhash_protected()` are now implemented with the v2.2 algorithm.
14
+
3
15
  ## [2.0.0] - 2025-05-18
4
16
 
5
17
  - Implement [rapidhash v2](https://github.com/Nicoshev/rapidhash/pull/16).
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # rapidhash-js
2
2
 
3
- [![npm version](https://badge.fury.io/js/rapidhash-js.png)](https://badge.fury.io/js/rapidhash-js)
3
+ [![npm version](https://badge.fury.io/js/rapidhash-js.svg)](https://badge.fury.io/js/rapidhash-js)
4
4
  [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/komiya-atsushi/rapidhash-js/test.yaml)](https://github.com/komiya-atsushi/rapidhash-js/actions/workflows/test.yaml)
5
5
  [![NPM License](https://img.shields.io/npm/l/rapidhash-js)](https://opensource.org/licenses/MIT)
6
6
 
@@ -19,79 +19,145 @@ npm install rapidhash-js
19
19
 
20
20
  ```typescript
21
21
  import {
22
- // The functions rapidhash, rapidhash_fast, and rapidhash_protected currently implement the v2 algorithm.
22
+ // These functions currently use the v3.0 implementation.
23
23
  rapidhash,
24
24
  rapidhash_fast,
25
25
  rapidhash_protected,
26
- // To use the old v1 algorithm, import rapidhash_v1 (or rapidhash_v1_fast, rapidhash_v1_protected) instead.
27
- rapidhash_v1,
26
+ // rapidhashMicro and rapidhashNano are additional variants in v3.0
27
+ rapidhashMicro,
28
+ rapidhashNano,
28
29
  } from 'rapidhash-js';
29
30
 
30
31
  // rapidhash() returns a 64-bit hash value represented as bigint.
31
- console.log(rapidhash('hello world')); // Output: 1722744455612372674n
32
+ console.log(rapidhash('hello world'));
32
33
 
33
34
  // You can specify a 64-bit seed value with the 'seed' option.
34
- console.log(rapidhash('hello world', {seed: 0x0123_4567_89AB_CDEFn})); // Output: 13409940373860458135n
35
+ console.log(rapidhash('hello world', {seed: 0x0123_4567_89AB_CDEFn}));
35
36
 
36
- // You can specify the behavior of the rapid_mum() function
37
- // with the rapidMumBehaviour option (default is 'fast').
38
- console.log(rapidhash('hello world', {rapidMumBehaviour: 'protected'})); // Output: 12365338091610779222n
37
+ // You can control rapid_mum() behavior with the rapidMumBehaviour option (default: 'fast').
38
+ console.log(rapidhash('hello world', {rapidMumBehaviour: 'protected'}));
39
39
 
40
40
  // Instead of specifying the rapidMumBehaviour option,
41
41
  // you can call rapidhash_fast() or rapidhash_protected().
42
42
  console.log(rapidhash_protected('hello world'));
43
+
44
+ // rapidhashMicro and rapidhashNano are optimized variants with smaller loop blocks
45
+ console.log(rapidhashMicro('hello world'));
46
+ console.log(rapidhashNano('hello world'));
47
+ ```
48
+
49
+ ### Using older versions
50
+
51
+ To use older versions of the algorithm, import from version-specific entry points:
52
+
53
+ ```typescript
54
+ // v2.2
55
+ import { rapidhash, rapidhash_fast, rapidhash_protected } from 'rapidhash-js/v2.2';
56
+
57
+ // v2.0
58
+ import { rapidhash, rapidhash_fast, rapidhash_protected } from 'rapidhash-js/v2.0';
59
+
60
+ // v1.0
61
+ import { rapidhash, rapidhash_fast, rapidhash_protected } from 'rapidhash-js/v1.0';
43
62
  ```
44
63
 
45
64
  ## Benchmark
46
65
 
66
+ <details>
67
+ <summary>GitHub Actions runner</summary>
68
+
47
69
  ```
48
70
  [Benchmark Environment]
49
- Node.js: v22.15.1
50
- CPU: Apple M3 Max (16 cores, 2400 MHz)
71
+ Node.js: v22.21.1
72
+ CPU: AMD EPYC 7763 64-Core Processor (4 cores, 0 MHz)
51
73
 
52
74
  [1-4 bytes]
53
- rapidhash_v1_fast : 6,158,460.80 ops/s (162.38 ns/iter)
54
- rapidhash_v1_protected : 5,238,665.86 ops/s (190.89 ns/iter)
55
- rapidhash_v2_fast : 6,652,432.34 ops/s (150.32 ns/iter)
56
- rapidhash_v2_protected : 5,426,323.09 ops/s (184.29 ns/iter)
57
-
58
- [1-8 bytes]
59
- rapidhash_v1_fast : 5,734,137.37 ops/s (174.39 ns/iter)
60
- rapidhash_v1_protected : 5,110,619.92 ops/s (195.67 ns/iter)
61
- rapidhash_v2_fast : 5,928,919.83 ops/s (168.66 ns/iter)
62
- rapidhash_v2_protected : 5,263,867.11 ops/s (189.97 ns/iter)
63
-
64
- [1-16 bytes]
65
- rapidhash_v1_fast : 5,655,101.18 ops/s (176.83 ns/iter)
66
- rapidhash_v1_protected : 5,096,905.96 ops/s (196.20 ns/iter)
67
- rapidhash_v2_fast : 5,861,882.39 ops/s (170.59 ns/iter)
68
- rapidhash_v2_protected : 5,210,155.86 ops/s (191.93 ns/iter)
69
-
70
- [17-56 bytes]
71
- rapidhash_v1_fast : 3,769,517.21 ops/s (265.29 ns/iter)
72
- rapidhash_v1_protected : 3,342,290.50 ops/s (299.20 ns/iter)
73
- rapidhash_v2_fast : 3,982,046.12 ops/s (251.13 ns/iter)
74
- rapidhash_v2_protected : 3,515,249.93 ops/s (284.47 ns/iter)
75
-
76
- [57-128 bytes]
77
- rapidhash_v1_fast : 2,260,312.89 ops/s (442.42 ns/iter)
78
- rapidhash_v1_protected : 2,048,074.92 ops/s (488.26 ns/iter)
79
- rapidhash_v2_fast : 2,161,841.53 ops/s (462.57 ns/iter)
80
- rapidhash_v2_protected : 2,005,979.52 ops/s (498.51 ns/iter)
81
-
82
- [129-256 bytes]
83
- rapidhash_v1_fast : 1,291,980.54 ops/s (774.01 ns/iter)
84
- rapidhash_v1_protected : 1,201,241.40 ops/s (832.47 ns/iter)
85
- rapidhash_v2_fast : 1,274,486.99 ops/s (784.63 ns/iter)
86
- rapidhash_v2_protected : 1,200,791.35 ops/s (832.78 ns/iter)
75
+ [v1.0] rapidhash (fast) : 2,420,375.33 ops/s (413.16 ns/iter)
76
+ [v1.0] rapidhash (protected) : 2,030,644.31 ops/s (492.45 ns/iter)
77
+ [v2.2] rapidhash (fast) : 2,734,729.69 ops/s (365.67 ns/iter)
78
+ [v2.2] rapidhash (protected) : 2,197,545.98 ops/s (455.05 ns/iter)
79
+ [v3.0] rapidhash (fast) : 2,674,325.05 ops/s (373.93 ns/iter)
80
+ [v3.0] rapidhash (protected) : 2,226,115.44 ops/s (449.21 ns/iter)
81
+ [v3.0] rapidhashMicro (fast) : 2,710,931.05 ops/s (368.88 ns/iter)
82
+ [v3.0] rapidhashMicro (protected) : 2,213,185.82 ops/s (451.84 ns/iter)
83
+ [v3.0] rapidhashNano (fast) : 2,655,616.94 ops/s (376.56 ns/iter)
84
+ [v3.0] rapidhashNano (protected) : 2,231,395.19 ops/s (448.15 ns/iter)
85
+
86
+ [5-8 bytes]
87
+ [v1.0] rapidhash (fast) : 2,371,330.83 ops/s (421.70 ns/iter)
88
+ [v1.0] rapidhash (protected) : 2,015,037.92 ops/s (496.27 ns/iter)
89
+ [v2.2] rapidhash (fast) : 2,525,306.66 ops/s (395.99 ns/iter)
90
+ [v2.2] rapidhash (protected) : 2,151,700.91 ops/s (464.75 ns/iter)
91
+ [v3.0] rapidhash (fast) : 2,398,649.67 ops/s (416.90 ns/iter)
92
+ [v3.0] rapidhash (protected) : 2,115,376.44 ops/s (472.73 ns/iter)
93
+ [v3.0] rapidhashMicro (fast) : 2,419,115.71 ops/s (413.37 ns/iter)
94
+ [v3.0] rapidhashMicro (protected) : 2,112,217.87 ops/s (473.44 ns/iter)
95
+ [v3.0] rapidhashNano (fast) : 2,464,902.12 ops/s (405.70 ns/iter)
96
+ [v3.0] rapidhashNano (protected) : 2,139,688.49 ops/s (467.36 ns/iter)
97
+
98
+ [9-16 bytes]
99
+ [v1.0] rapidhash (fast) : 2,373,128.45 ops/s (421.38 ns/iter)
100
+ [v1.0] rapidhash (protected) : 2,019,580.56 ops/s (495.15 ns/iter)
101
+ [v2.2] rapidhash (fast) : 2,494,555.85 ops/s (400.87 ns/iter)
102
+ [v2.2] rapidhash (protected) : 2,164,351.62 ops/s (462.03 ns/iter)
103
+ [v3.0] rapidhash (fast) : 2,445,111.08 ops/s (408.98 ns/iter)
104
+ [v3.0] rapidhash (protected) : 2,124,576.46 ops/s (470.68 ns/iter)
105
+ [v3.0] rapidhashMicro (fast) : 2,534,830.67 ops/s (394.50 ns/iter)
106
+ [v3.0] rapidhashMicro (protected) : 2,144,787.46 ops/s (466.25 ns/iter)
107
+ [v3.0] rapidhashNano (fast) : 2,507,392.59 ops/s (398.82 ns/iter)
108
+ [v3.0] rapidhashNano (protected) : 2,159,198.42 ops/s (463.13 ns/iter)
109
+
110
+ [17-64 bytes]
111
+ [v1.0] rapidhash (fast) : 1,519,363.59 ops/s (658.17 ns/iter)
112
+ [v1.0] rapidhash (protected) : 1,308,565.57 ops/s (764.20 ns/iter)
113
+ [v2.2] rapidhash (fast) : 1,627,131.71 ops/s (614.58 ns/iter)
114
+ [v2.2] rapidhash (protected) : 1,358,146.83 ops/s (736.30 ns/iter)
115
+ [v3.0] rapidhash (fast) : 1,557,365.74 ops/s (642.11 ns/iter)
116
+ [v3.0] rapidhash (protected) : 1,278,365.66 ops/s (782.25 ns/iter)
117
+ [v3.0] rapidhashMicro (fast) : 1,566,121.67 ops/s (638.52 ns/iter)
118
+ [v3.0] rapidhashMicro (protected) : 1,309,712.62 ops/s (763.53 ns/iter)
119
+ [v3.0] rapidhashNano (fast) : 1,522,941.99 ops/s (656.62 ns/iter)
120
+ [v3.0] rapidhashNano (protected) : 1,287,697.13 ops/s (776.58 ns/iter)
121
+
122
+ [65-111 bytes]
123
+ [v1.0] rapidhash (fast) : 1,012,019.84 ops/s (988.12 ns/iter)
124
+ [v1.0] rapidhash (protected) : 851,571.85 ops/s (1174.30 ns/iter)
125
+ [v2.2] rapidhash (fast) : 1,032,261.69 ops/s (968.75 ns/iter)
126
+ [v2.2] rapidhash (protected) : 873,368.59 ops/s (1144.99 ns/iter)
127
+ [v3.0] rapidhash (fast) : 1,049,513.86 ops/s (952.82 ns/iter)
128
+ [v3.0] rapidhash (protected) : 875,091.75 ops/s (1142.74 ns/iter)
129
+ [v3.0] rapidhashMicro (fast) : 1,008,137.11 ops/s (991.93 ns/iter)
130
+ [v3.0] rapidhashMicro (protected) : 843,635.34 ops/s (1185.35 ns/iter)
131
+ [v3.0] rapidhashNano (fast) : 1,019,000.92 ops/s (981.35 ns/iter)
132
+ [v3.0] rapidhashNano (protected) : 846,423.68 ops/s (1181.44 ns/iter)
133
+
134
+ [112-256 bytes]
135
+ [v1.0] rapidhash (fast) : 614,172.98 ops/s (1.63 µs/iter)
136
+ [v1.0] rapidhash (protected) : 513,971.04 ops/s (1.95 µs/iter)
137
+ [v2.2] rapidhash (fast) : 610,816.92 ops/s (1.64 µs/iter)
138
+ [v2.2] rapidhash (protected) : 517,844.27 ops/s (1.93 µs/iter)
139
+ [v3.0] rapidhash (fast) : 594,643.45 ops/s (1.68 µs/iter)
140
+ [v3.0] rapidhash (protected) : 499,762.62 ops/s (2.00 µs/iter)
141
+ [v3.0] rapidhashMicro (fast) : 617,073.02 ops/s (1.62 µs/iter)
142
+ [v3.0] rapidhashMicro (protected) : 505,441.57 ops/s (1.98 µs/iter)
143
+ [v3.0] rapidhashNano (fast) : 625,289.65 ops/s (1.60 µs/iter)
144
+ [v3.0] rapidhashNano (protected) : 511,777.23 ops/s (1.95 µs/iter)
87
145
 
88
146
  [1M bytes]
89
- rapidhash_v1_fast : 308.34 ops/s (3.24 ms/iter)
90
- rapidhash_v1_protected : 291.73 ops/s (3.43 ms/iter)
91
- rapidhash_v2_fast : 309.57 ops/s (3.23 ms/iter)
92
- rapidhash_v2_protected : 291.12 ops/s (3.43 ms/iter)
147
+ [v1.0] rapidhash (fast) : 147.45 ops/s (6.78 ms/iter)
148
+ [v1.0] rapidhash (protected) : 121.19 ops/s (8.25 ms/iter)
149
+ [v2.2] rapidhash (fast) : 152.66 ops/s (6.55 ms/iter)
150
+ [v2.2] rapidhash (protected) : 125.51 ops/s (7.97 ms/iter)
151
+ [v3.0] rapidhash (fast) : 153.71 ops/s (6.51 ms/iter)
152
+ [v3.0] rapidhash (protected) : 121.11 ops/s (8.26 ms/iter)
153
+ [v3.0] rapidhashMicro (fast) : 153.73 ops/s (6.50 ms/iter)
154
+ [v3.0] rapidhashMicro (protected) : 121.58 ops/s (8.23 ms/iter)
155
+ [v3.0] rapidhashNano (fast) : 152.79 ops/s (6.54 ms/iter)
156
+ [v3.0] rapidhashNano (protected) : 120.72 ops/s (8.28 ms/iter)
93
157
  ```
94
158
 
159
+ </details>
160
+
95
161
  ## License
96
162
 
97
163
  MIT License
@@ -0,0 +1,7 @@
1
+ type RapidMumBehaviour = 'fast' | 'protected';
2
+ interface RapidhashOptions {
3
+ seed: bigint;
4
+ rapidMumBehaviour: RapidMumBehaviour;
5
+ }
6
+
7
+ export type { RapidhashOptions as R };
@@ -0,0 +1,7 @@
1
+ type RapidMumBehaviour = 'fast' | 'protected';
2
+ interface RapidhashOptions {
3
+ seed: bigint;
4
+ rapidMumBehaviour: RapidMumBehaviour;
5
+ }
6
+
7
+ export type { RapidhashOptions as R };
package/lib/index.d.mts CHANGED
@@ -1,8 +1,4 @@
1
- type RapidMumBehaviour = 'fast' | 'protected';
2
- interface RapidhashOptions {
3
- seed: bigint;
4
- rapidMumBehaviour: RapidMumBehaviour;
5
- }
1
+ import { R as RapidhashOptions } from './common-FK5Aq1u9.mjs';
6
2
 
7
3
  /**
8
4
  * Calculate a 64-bit hash value of the given message.
@@ -10,9 +6,9 @@ interface RapidhashOptions {
10
6
  * @param message {string|Uint8Array|DataView} The message to be hashed.
11
7
  * @param options Options for modifying the hash calculation.
12
8
  * @param options.seed {bigint} 64-bit unsigned seed value.
13
- * @param options.rapidMumBehaviour {'fast'|'protected'} Alters behaviour of the rapid_mum function. Defaults to 'fast'.
9
+ * @param options.rapidMumBehaviour {"fast"|"protected"} Alters behaviour of the rapid_mum function. Defaults to 'fast'.
14
10
  */
15
- declare function rapidhash_v1(message: string | Uint8Array | DataView, options?: Partial<RapidhashOptions>): bigint;
11
+ declare function rapidhash(message: string | Uint8Array | DataView, options?: Partial<RapidhashOptions>): bigint;
16
12
  /**
17
13
  * Calculate a 64-bit hash value of the given message.
18
14
  * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'fast'.
@@ -21,7 +17,7 @@ declare function rapidhash_v1(message: string | Uint8Array | DataView, options?:
21
17
  * @param options Options for modifying the hash calculation.
22
18
  * @param options.seed {bigint} 64-bit unsigned seed value.
23
19
  */
24
- declare function rapidhash_v1_fast(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
20
+ declare function rapidhash_fast(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
25
21
  /**
26
22
  * Calculate a 64-bit hash value of the given message.
27
23
  * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'protected'.
@@ -30,34 +26,6 @@ declare function rapidhash_v1_fast(message: string | Uint8Array | DataView, opti
30
26
  * @param options Options for modifying the hash calculation.
31
27
  * @param options.seed {bigint} 64-bit unsigned seed value.
32
28
  */
33
- declare function rapidhash_v1_protected(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
29
+ declare function rapidhash_protected(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
34
30
 
35
- /**
36
- * Calculate a 64-bit hash value of the given message.
37
- *
38
- * @param message {string|Uint8Array|DataView} The message to be hashed.
39
- * @param options Options for modifying the hash calculation.
40
- * @param options.seed {bigint} 64-bit unsigned seed value.
41
- * @param options.rapidMumBehaviour {'fast'|'protected'} Alters behaviour of the rapid_mum function. Defaults to 'fast'.
42
- */
43
- declare function rapidhash_v2(message: string | Uint8Array | DataView, options?: Partial<RapidhashOptions>): bigint;
44
- /**
45
- * Calculate a 64-bit hash value of the given message.
46
- * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'fast'.
47
- *
48
- * @param message {string|Uint8Array|DataView} The message to be hashed.
49
- * @param options Options for modifying the hash calculation.
50
- * @param options.seed {bigint} 64-bit unsigned seed value.
51
- */
52
- declare function rapidhash_v2_fast(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
53
- /**
54
- * Calculate a 64-bit hash value of the given message.
55
- * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'protected'.
56
- *
57
- * @param message {string|Uint8Array|DataView} The message to be hashed.
58
- * @param options Options for modifying the hash calculation.
59
- * @param options.seed {bigint} 64-bit unsigned seed value.
60
- */
61
- declare function rapidhash_v2_protected(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
62
-
63
- export { rapidhash_v2 as rapidhash, rapidhash_v2_fast as rapidhash_fast, rapidhash_v2_protected as rapidhash_protected, rapidhash_v1, rapidhash_v1_fast, rapidhash_v1_protected, rapidhash_v2, rapidhash_v2_fast, rapidhash_v2_protected };
31
+ export { rapidhash, rapidhash_fast, rapidhash_protected };
package/lib/index.d.ts CHANGED
@@ -1,8 +1,4 @@
1
- type RapidMumBehaviour = 'fast' | 'protected';
2
- interface RapidhashOptions {
3
- seed: bigint;
4
- rapidMumBehaviour: RapidMumBehaviour;
5
- }
1
+ import { R as RapidhashOptions } from './common-FK5Aq1u9.js';
6
2
 
7
3
  /**
8
4
  * Calculate a 64-bit hash value of the given message.
@@ -10,9 +6,9 @@ interface RapidhashOptions {
10
6
  * @param message {string|Uint8Array|DataView} The message to be hashed.
11
7
  * @param options Options for modifying the hash calculation.
12
8
  * @param options.seed {bigint} 64-bit unsigned seed value.
13
- * @param options.rapidMumBehaviour {'fast'|'protected'} Alters behaviour of the rapid_mum function. Defaults to 'fast'.
9
+ * @param options.rapidMumBehaviour {"fast"|"protected"} Alters behaviour of the rapid_mum function. Defaults to 'fast'.
14
10
  */
15
- declare function rapidhash_v1(message: string | Uint8Array | DataView, options?: Partial<RapidhashOptions>): bigint;
11
+ declare function rapidhash(message: string | Uint8Array | DataView, options?: Partial<RapidhashOptions>): bigint;
16
12
  /**
17
13
  * Calculate a 64-bit hash value of the given message.
18
14
  * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'fast'.
@@ -21,7 +17,7 @@ declare function rapidhash_v1(message: string | Uint8Array | DataView, options?:
21
17
  * @param options Options for modifying the hash calculation.
22
18
  * @param options.seed {bigint} 64-bit unsigned seed value.
23
19
  */
24
- declare function rapidhash_v1_fast(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
20
+ declare function rapidhash_fast(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
25
21
  /**
26
22
  * Calculate a 64-bit hash value of the given message.
27
23
  * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'protected'.
@@ -30,34 +26,6 @@ declare function rapidhash_v1_fast(message: string | Uint8Array | DataView, opti
30
26
  * @param options Options for modifying the hash calculation.
31
27
  * @param options.seed {bigint} 64-bit unsigned seed value.
32
28
  */
33
- declare function rapidhash_v1_protected(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
29
+ declare function rapidhash_protected(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
34
30
 
35
- /**
36
- * Calculate a 64-bit hash value of the given message.
37
- *
38
- * @param message {string|Uint8Array|DataView} The message to be hashed.
39
- * @param options Options for modifying the hash calculation.
40
- * @param options.seed {bigint} 64-bit unsigned seed value.
41
- * @param options.rapidMumBehaviour {'fast'|'protected'} Alters behaviour of the rapid_mum function. Defaults to 'fast'.
42
- */
43
- declare function rapidhash_v2(message: string | Uint8Array | DataView, options?: Partial<RapidhashOptions>): bigint;
44
- /**
45
- * Calculate a 64-bit hash value of the given message.
46
- * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'fast'.
47
- *
48
- * @param message {string|Uint8Array|DataView} The message to be hashed.
49
- * @param options Options for modifying the hash calculation.
50
- * @param options.seed {bigint} 64-bit unsigned seed value.
51
- */
52
- declare function rapidhash_v2_fast(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
53
- /**
54
- * Calculate a 64-bit hash value of the given message.
55
- * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'protected'.
56
- *
57
- * @param message {string|Uint8Array|DataView} The message to be hashed.
58
- * @param options Options for modifying the hash calculation.
59
- * @param options.seed {bigint} 64-bit unsigned seed value.
60
- */
61
- declare function rapidhash_v2_protected(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
62
-
63
- export { rapidhash_v2 as rapidhash, rapidhash_v2_fast as rapidhash_fast, rapidhash_v2_protected as rapidhash_protected, rapidhash_v1, rapidhash_v1_fast, rapidhash_v1_protected, rapidhash_v2, rapidhash_v2_fast, rapidhash_v2_protected };
31
+ export { rapidhash, rapidhash_fast, rapidhash_protected };