@robinpath/hash 0.1.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/README.md +99 -0
- package/dist/hash.d.ts +236 -0
- package/dist/hash.d.ts.map +1 -0
- package/dist/hash.js +343 -0
- package/dist/hash.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/package.json +13 -0
package/README.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# @robinpath/hash
|
|
2
|
+
|
|
3
|
+
> Cryptographic hashing utilities: MD5, SHA family, HMAC, CRC32, file hashing, UUID v5 generation, secure random bytes, and content fingerprinting
|
|
4
|
+
|
|
5
|
+
   
|
|
6
|
+
|
|
7
|
+
## Why use this module?
|
|
8
|
+
|
|
9
|
+
The `hash` module lets you:
|
|
10
|
+
|
|
11
|
+
- Compute MD5 hash of a string
|
|
12
|
+
- Compute SHA-1 hash of a string
|
|
13
|
+
- Compute SHA-256 hash of a string
|
|
14
|
+
- Compute SHA-512 hash of a string
|
|
15
|
+
- Compute SHA-3 hash of a string
|
|
16
|
+
|
|
17
|
+
All functions are callable directly from RobinPath scripts with a simple, consistent API.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install @robinpath/hash
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
No credentials needed — start using it right away:
|
|
28
|
+
|
|
29
|
+
```robinpath
|
|
30
|
+
hash.sha1
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Available Functions
|
|
34
|
+
|
|
35
|
+
| Function | Description |
|
|
36
|
+
|----------|-------------|
|
|
37
|
+
| `hash.md5` | Compute MD5 hash of a string |
|
|
38
|
+
| `hash.sha1` | Compute SHA-1 hash of a string |
|
|
39
|
+
| `hash.sha256` | Compute SHA-256 hash of a string |
|
|
40
|
+
| `hash.sha512` | Compute SHA-512 hash of a string |
|
|
41
|
+
| `hash.sha3` | Compute SHA-3 hash of a string |
|
|
42
|
+
| `hash.hmac` | Compute HMAC of a string with a secret key |
|
|
43
|
+
| `hash.hashFile` | Compute the hash of a file's contents |
|
|
44
|
+
| `hash.hashStream` | Compute a hash from an array of data chunks (simulates stream hashing) |
|
|
45
|
+
| `hash.crc32` | Compute CRC32 checksum of a string |
|
|
46
|
+
| `hash.checksum` | Verify that a string matches an expected hash |
|
|
47
|
+
| `hash.compare` | Timing-safe comparison of two strings to prevent timing attacks |
|
|
48
|
+
| `hash.uuid5` | Generate a deterministic UUID v5 from a name and namespace |
|
|
49
|
+
| `hash.randomBytes` | Generate cryptographically secure random bytes |
|
|
50
|
+
| `hash.randomHex` | Generate a random hexadecimal string of specified length |
|
|
51
|
+
| `hash.randomBase64` | Generate a random Base64-encoded string |
|
|
52
|
+
| `hash.fingerprint` | Generate a content fingerprint combining MD5 and SHA-256 hashes |
|
|
53
|
+
|
|
54
|
+
## Examples
|
|
55
|
+
|
|
56
|
+
### Compute SHA-1 hash of a string
|
|
57
|
+
|
|
58
|
+
```robinpath
|
|
59
|
+
hash.sha1
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Compute SHA-256 hash of a string
|
|
63
|
+
|
|
64
|
+
```robinpath
|
|
65
|
+
hash.sha256
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Compute SHA-512 hash of a string
|
|
69
|
+
|
|
70
|
+
```robinpath
|
|
71
|
+
hash.sha512
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Integration with RobinPath
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
import { RobinPath } from "@wiredwp/robinpath";
|
|
78
|
+
import Module from "@robinpath/hash";
|
|
79
|
+
|
|
80
|
+
const rp = new RobinPath();
|
|
81
|
+
rp.registerModule(Module.name, Module.functions);
|
|
82
|
+
rp.registerModuleMeta(Module.name, Module.functionMetadata);
|
|
83
|
+
|
|
84
|
+
const result = await rp.executeScript(`
|
|
85
|
+
hash.sha1
|
|
86
|
+
`);
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Full API Reference
|
|
90
|
+
|
|
91
|
+
See [MODULE.md](./MODULE.md) for complete documentation including all parameters, return types, error handling, and advanced examples.
|
|
92
|
+
|
|
93
|
+
## Related Modules
|
|
94
|
+
|
|
95
|
+
- [`@robinpath/json`](../json) — JSON module for complementary functionality
|
|
96
|
+
|
|
97
|
+
## License
|
|
98
|
+
|
|
99
|
+
MIT
|
package/dist/hash.d.ts
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import type { Value } from "@wiredwp/robinpath";
|
|
2
|
+
declare function md5(args: Value[]): any;
|
|
3
|
+
declare function sha1(args: Value[]): any;
|
|
4
|
+
declare function sha256(args: Value[]): any;
|
|
5
|
+
declare function sha512(args: Value[]): any;
|
|
6
|
+
declare function sha3(args: Value[]): any;
|
|
7
|
+
declare function hmac(args: Value[]): any;
|
|
8
|
+
declare function hashFile(args: Value[]): any;
|
|
9
|
+
declare function hashStream(args: Value[]): any;
|
|
10
|
+
declare function crc32(args: Value[]): any;
|
|
11
|
+
declare function checksum(args: Value[]): any;
|
|
12
|
+
declare function compare(args: Value[]): any;
|
|
13
|
+
declare function uuid5(args: Value[]): any;
|
|
14
|
+
declare function randomBytes(args: Value[]): any;
|
|
15
|
+
declare function randomHex(args: Value[]): any;
|
|
16
|
+
declare function randomBase64(args: Value[]): any;
|
|
17
|
+
declare function fingerprint(args: Value[]): any;
|
|
18
|
+
export declare const HashFunctions: {
|
|
19
|
+
md5: typeof md5;
|
|
20
|
+
sha1: typeof sha1;
|
|
21
|
+
sha256: typeof sha256;
|
|
22
|
+
sha512: typeof sha512;
|
|
23
|
+
sha3: typeof sha3;
|
|
24
|
+
hmac: typeof hmac;
|
|
25
|
+
hashFile: typeof hashFile;
|
|
26
|
+
hashStream: typeof hashStream;
|
|
27
|
+
crc32: typeof crc32;
|
|
28
|
+
checksum: typeof checksum;
|
|
29
|
+
compare: typeof compare;
|
|
30
|
+
uuid5: typeof uuid5;
|
|
31
|
+
randomBytes: typeof randomBytes;
|
|
32
|
+
randomHex: typeof randomHex;
|
|
33
|
+
randomBase64: typeof randomBase64;
|
|
34
|
+
fingerprint: typeof fingerprint;
|
|
35
|
+
};
|
|
36
|
+
export declare const HashFunctionMetadata: {
|
|
37
|
+
md5: {
|
|
38
|
+
description: string;
|
|
39
|
+
parameters: {
|
|
40
|
+
name: string;
|
|
41
|
+
dataType: string;
|
|
42
|
+
formInputType: string;
|
|
43
|
+
required: boolean;
|
|
44
|
+
description: string;
|
|
45
|
+
}[];
|
|
46
|
+
returnType: string;
|
|
47
|
+
returnDescription: string;
|
|
48
|
+
};
|
|
49
|
+
sha1: {
|
|
50
|
+
description: string;
|
|
51
|
+
parameters: {
|
|
52
|
+
name: string;
|
|
53
|
+
dataType: string;
|
|
54
|
+
formInputType: string;
|
|
55
|
+
required: boolean;
|
|
56
|
+
description: string;
|
|
57
|
+
}[];
|
|
58
|
+
returnType: string;
|
|
59
|
+
returnDescription: string;
|
|
60
|
+
};
|
|
61
|
+
sha256: {
|
|
62
|
+
description: string;
|
|
63
|
+
parameters: {
|
|
64
|
+
name: string;
|
|
65
|
+
dataType: string;
|
|
66
|
+
formInputType: string;
|
|
67
|
+
required: boolean;
|
|
68
|
+
description: string;
|
|
69
|
+
}[];
|
|
70
|
+
returnType: string;
|
|
71
|
+
returnDescription: string;
|
|
72
|
+
};
|
|
73
|
+
sha512: {
|
|
74
|
+
description: string;
|
|
75
|
+
parameters: {
|
|
76
|
+
name: string;
|
|
77
|
+
dataType: string;
|
|
78
|
+
formInputType: string;
|
|
79
|
+
required: boolean;
|
|
80
|
+
description: string;
|
|
81
|
+
}[];
|
|
82
|
+
returnType: string;
|
|
83
|
+
returnDescription: string;
|
|
84
|
+
};
|
|
85
|
+
sha3: {
|
|
86
|
+
description: string;
|
|
87
|
+
parameters: {
|
|
88
|
+
name: string;
|
|
89
|
+
dataType: string;
|
|
90
|
+
formInputType: string;
|
|
91
|
+
required: boolean;
|
|
92
|
+
description: string;
|
|
93
|
+
}[];
|
|
94
|
+
returnType: string;
|
|
95
|
+
returnDescription: string;
|
|
96
|
+
};
|
|
97
|
+
hmac: {
|
|
98
|
+
description: string;
|
|
99
|
+
parameters: {
|
|
100
|
+
name: string;
|
|
101
|
+
dataType: string;
|
|
102
|
+
formInputType: string;
|
|
103
|
+
required: boolean;
|
|
104
|
+
description: string;
|
|
105
|
+
}[];
|
|
106
|
+
returnType: string;
|
|
107
|
+
returnDescription: string;
|
|
108
|
+
};
|
|
109
|
+
hashFile: {
|
|
110
|
+
description: string;
|
|
111
|
+
parameters: {
|
|
112
|
+
name: string;
|
|
113
|
+
dataType: string;
|
|
114
|
+
formInputType: string;
|
|
115
|
+
required: boolean;
|
|
116
|
+
description: string;
|
|
117
|
+
}[];
|
|
118
|
+
returnType: string;
|
|
119
|
+
returnDescription: string;
|
|
120
|
+
};
|
|
121
|
+
hashStream: {
|
|
122
|
+
description: string;
|
|
123
|
+
parameters: {
|
|
124
|
+
name: string;
|
|
125
|
+
dataType: string;
|
|
126
|
+
formInputType: string;
|
|
127
|
+
required: boolean;
|
|
128
|
+
description: string;
|
|
129
|
+
}[];
|
|
130
|
+
returnType: string;
|
|
131
|
+
returnDescription: string;
|
|
132
|
+
};
|
|
133
|
+
crc32: {
|
|
134
|
+
description: string;
|
|
135
|
+
parameters: {
|
|
136
|
+
name: string;
|
|
137
|
+
dataType: string;
|
|
138
|
+
formInputType: string;
|
|
139
|
+
required: boolean;
|
|
140
|
+
description: string;
|
|
141
|
+
}[];
|
|
142
|
+
returnType: string;
|
|
143
|
+
returnDescription: string;
|
|
144
|
+
};
|
|
145
|
+
checksum: {
|
|
146
|
+
description: string;
|
|
147
|
+
parameters: {
|
|
148
|
+
name: string;
|
|
149
|
+
dataType: string;
|
|
150
|
+
formInputType: string;
|
|
151
|
+
required: boolean;
|
|
152
|
+
description: string;
|
|
153
|
+
}[];
|
|
154
|
+
returnType: string;
|
|
155
|
+
returnDescription: string;
|
|
156
|
+
};
|
|
157
|
+
compare: {
|
|
158
|
+
description: string;
|
|
159
|
+
parameters: {
|
|
160
|
+
name: string;
|
|
161
|
+
dataType: string;
|
|
162
|
+
formInputType: string;
|
|
163
|
+
required: boolean;
|
|
164
|
+
description: string;
|
|
165
|
+
}[];
|
|
166
|
+
returnType: string;
|
|
167
|
+
returnDescription: string;
|
|
168
|
+
};
|
|
169
|
+
uuid5: {
|
|
170
|
+
description: string;
|
|
171
|
+
parameters: {
|
|
172
|
+
name: string;
|
|
173
|
+
dataType: string;
|
|
174
|
+
formInputType: string;
|
|
175
|
+
required: boolean;
|
|
176
|
+
description: string;
|
|
177
|
+
}[];
|
|
178
|
+
returnType: string;
|
|
179
|
+
returnDescription: string;
|
|
180
|
+
};
|
|
181
|
+
randomBytes: {
|
|
182
|
+
description: string;
|
|
183
|
+
parameters: {
|
|
184
|
+
name: string;
|
|
185
|
+
dataType: string;
|
|
186
|
+
formInputType: string;
|
|
187
|
+
required: boolean;
|
|
188
|
+
description: string;
|
|
189
|
+
}[];
|
|
190
|
+
returnType: string;
|
|
191
|
+
returnDescription: string;
|
|
192
|
+
};
|
|
193
|
+
randomHex: {
|
|
194
|
+
description: string;
|
|
195
|
+
parameters: {
|
|
196
|
+
name: string;
|
|
197
|
+
dataType: string;
|
|
198
|
+
formInputType: string;
|
|
199
|
+
required: boolean;
|
|
200
|
+
description: string;
|
|
201
|
+
}[];
|
|
202
|
+
returnType: string;
|
|
203
|
+
returnDescription: string;
|
|
204
|
+
};
|
|
205
|
+
randomBase64: {
|
|
206
|
+
description: string;
|
|
207
|
+
parameters: {
|
|
208
|
+
name: string;
|
|
209
|
+
dataType: string;
|
|
210
|
+
formInputType: string;
|
|
211
|
+
required: boolean;
|
|
212
|
+
description: string;
|
|
213
|
+
}[];
|
|
214
|
+
returnType: string;
|
|
215
|
+
returnDescription: string;
|
|
216
|
+
};
|
|
217
|
+
fingerprint: {
|
|
218
|
+
description: string;
|
|
219
|
+
parameters: {
|
|
220
|
+
name: string;
|
|
221
|
+
dataType: string;
|
|
222
|
+
formInputType: string;
|
|
223
|
+
required: boolean;
|
|
224
|
+
description: string;
|
|
225
|
+
}[];
|
|
226
|
+
returnType: string;
|
|
227
|
+
returnDescription: string;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
export declare const HashModuleMetadata: {
|
|
231
|
+
description: string;
|
|
232
|
+
version: string;
|
|
233
|
+
tags: string[];
|
|
234
|
+
};
|
|
235
|
+
export {};
|
|
236
|
+
//# sourceMappingURL=hash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../src/hash.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoD,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAgClG,iBAAS,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAI/B;AAED,iBAAS,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAIhC;AAED,iBAAS,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAIlC;AAED,iBAAS,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAIlC;AAED,iBAAS,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAMhC;AAED,iBAAS,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAMhC;AAED,iBAAS,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAMpC;AAED,iBAAS,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAkBtC;AAED,iBAAS,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAajC;AAED,iBAAS,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAMpC;AAED,iBAAS,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CASnC;AAED,iBAAS,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAejC;AAED,iBAAS,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAQvC;AAED,iBAAS,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAIrC;AAED,iBAAS,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAKxC;AAED,iBAAS,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,GAAG,CAYvC;AAID,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;CAiBzB,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqKhC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC"}
|
package/dist/hash.js
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
// ── Helpers ──────────────────────────────────────────────────────────────────
|
|
2
|
+
function toString(v) {
|
|
3
|
+
if (typeof v === "string")
|
|
4
|
+
return v;
|
|
5
|
+
if (v === null || v === undefined)
|
|
6
|
+
return "";
|
|
7
|
+
if (Buffer.isBuffer(v))
|
|
8
|
+
return v.toString("utf8");
|
|
9
|
+
return String(v);
|
|
10
|
+
}
|
|
11
|
+
function hashWith(algorithm, data, encoding = "hex") {
|
|
12
|
+
return any(algorithm).update(data, "utf8").digest(encoding);
|
|
13
|
+
}
|
|
14
|
+
// CRC32 lookup table
|
|
15
|
+
const CRC32_TABLE = (() => {
|
|
16
|
+
const table = new Array(256);
|
|
17
|
+
for (let i = 0; i < 256; i++) {
|
|
18
|
+
let crc = i;
|
|
19
|
+
for (let j = 0; j < 8; j++) {
|
|
20
|
+
crc = crc & 1 ? (crc >>> 1) ^ 0xedb88320 : crc >>> 1;
|
|
21
|
+
}
|
|
22
|
+
table[i] = crc >>> 0;
|
|
23
|
+
}
|
|
24
|
+
return table;
|
|
25
|
+
})();
|
|
26
|
+
// ── Functions ────────────────────────────────────────────────────────────────
|
|
27
|
+
function md5(args) {
|
|
28
|
+
const input = toString(args[0]);
|
|
29
|
+
const encoding = toString(args[1]) || "hex";
|
|
30
|
+
return hashWith("md5", input, encoding);
|
|
31
|
+
}
|
|
32
|
+
function sha1(args) {
|
|
33
|
+
const input = toString(args[0]);
|
|
34
|
+
const encoding = toString(args[1]) || "hex";
|
|
35
|
+
return hashWith("sha1", input, encoding);
|
|
36
|
+
}
|
|
37
|
+
function sha256(args) {
|
|
38
|
+
const input = toString(args[0]);
|
|
39
|
+
const encoding = toString(args[1]) || "hex";
|
|
40
|
+
return hashWith("sha256", input, encoding);
|
|
41
|
+
}
|
|
42
|
+
function sha512(args) {
|
|
43
|
+
const input = toString(args[0]);
|
|
44
|
+
const encoding = toString(args[1]) || "hex";
|
|
45
|
+
return hashWith("sha512", input, encoding);
|
|
46
|
+
}
|
|
47
|
+
function sha3(args) {
|
|
48
|
+
const input = toString(args[0]);
|
|
49
|
+
const bits = typeof args[1] === "number" ? args[1] : 256;
|
|
50
|
+
const encoding = toString(args[2]) || "hex";
|
|
51
|
+
const algorithm = `sha3-${bits}`;
|
|
52
|
+
return any(algorithm).update(input, "utf8").digest(encoding);
|
|
53
|
+
}
|
|
54
|
+
function hmac(args) {
|
|
55
|
+
const input = toString(args[0]);
|
|
56
|
+
const key = toString(args[1]);
|
|
57
|
+
const algorithm = toString(args[2]) || "sha256";
|
|
58
|
+
const encoding = toString(args[3]) || "hex";
|
|
59
|
+
return any(algorithm, key).update(input, "utf8").digest(encoding);
|
|
60
|
+
}
|
|
61
|
+
function hashFile(args) {
|
|
62
|
+
const filePath = toString(args[0]);
|
|
63
|
+
const algorithm = toString(args[1]) || "sha256";
|
|
64
|
+
const encoding = toString(args[2]) || "hex";
|
|
65
|
+
const content = any(filePath);
|
|
66
|
+
return any(algorithm).update(content).digest(encoding);
|
|
67
|
+
}
|
|
68
|
+
function hashStream(args) {
|
|
69
|
+
// For stream hashing, accept chunks as an array of strings/buffers
|
|
70
|
+
const chunks = args[0];
|
|
71
|
+
const algorithm = toString(args[1]) || "sha256";
|
|
72
|
+
const encoding = toString(args[2]) || "hex";
|
|
73
|
+
const hash = any(algorithm);
|
|
74
|
+
if (Array.isArray(chunks)) {
|
|
75
|
+
for (const chunk of chunks) {
|
|
76
|
+
if (Buffer.isBuffer(chunk)) {
|
|
77
|
+
hash.update(chunk);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
hash.update(toString(chunk), "utf8");
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
hash.update(toString(chunks), "utf8");
|
|
86
|
+
}
|
|
87
|
+
return hash.digest(encoding);
|
|
88
|
+
}
|
|
89
|
+
function crc32(args) {
|
|
90
|
+
const input = toString(args[0]);
|
|
91
|
+
const buf = Buffer.from(input, "utf8");
|
|
92
|
+
let crc = 0xffffffff;
|
|
93
|
+
for (let i = 0; i < buf.length; i++) {
|
|
94
|
+
crc = (crc >>> 8) ^ CRC32_TABLE[(crc ^ buf[i]) & 0xff];
|
|
95
|
+
}
|
|
96
|
+
crc = (crc ^ 0xffffffff) >>> 0;
|
|
97
|
+
const asHex = !!args[1];
|
|
98
|
+
if (asHex) {
|
|
99
|
+
return crc.toString(16).padStart(8, "0");
|
|
100
|
+
}
|
|
101
|
+
return crc;
|
|
102
|
+
}
|
|
103
|
+
function checksum(args) {
|
|
104
|
+
const input = toString(args[0]);
|
|
105
|
+
const expectedHash = toString(args[1]);
|
|
106
|
+
const algorithm = toString(args[2]) || "sha256";
|
|
107
|
+
const actual = hashWith(algorithm, input);
|
|
108
|
+
return actual.toLowerCase() === expectedHash.toLowerCase();
|
|
109
|
+
}
|
|
110
|
+
function compare(args) {
|
|
111
|
+
const a = toString(args[0]);
|
|
112
|
+
const b = toString(args[1]);
|
|
113
|
+
const bufA = Buffer.from(a, "utf8");
|
|
114
|
+
const bufB = Buffer.from(b, "utf8");
|
|
115
|
+
if (bufA.length !== bufB.length) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
return any(bufA, bufB);
|
|
119
|
+
}
|
|
120
|
+
function uuid5(args) {
|
|
121
|
+
const name = toString(args[0]);
|
|
122
|
+
const namespace = toString(args[1]) || "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; // DNS namespace
|
|
123
|
+
// Parse namespace UUID to bytes
|
|
124
|
+
const nsHex = namespace.replace(/-/g, "");
|
|
125
|
+
const nsBytes = Buffer.from(nsHex, "hex");
|
|
126
|
+
const nameBytes = Buffer.from(name, "utf8");
|
|
127
|
+
const combined = Buffer.concat([nsBytes, nameBytes]);
|
|
128
|
+
const hash = any("sha1").update(combined).digest();
|
|
129
|
+
// Set version 5
|
|
130
|
+
hash[6] = (hash[6] & 0x0f) | 0x50;
|
|
131
|
+
// Set variant
|
|
132
|
+
hash[8] = (hash[8] & 0x3f) | 0x80;
|
|
133
|
+
const hex = hash.toString("hex").slice(0, 32);
|
|
134
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20, 32)}`;
|
|
135
|
+
}
|
|
136
|
+
function randomBytes(args) {
|
|
137
|
+
const size = typeof args[0] === "number" ? args[0] : 32;
|
|
138
|
+
const encoding = toString(args[1]) || "hex";
|
|
139
|
+
const buf = any(size);
|
|
140
|
+
if (encoding === "buffer" || encoding === "raw") {
|
|
141
|
+
return Array.from(buf);
|
|
142
|
+
}
|
|
143
|
+
return buf.toString(encoding);
|
|
144
|
+
}
|
|
145
|
+
function randomHex(args) {
|
|
146
|
+
const length = typeof args[0] === "number" ? args[0] : 32;
|
|
147
|
+
const byteCount = Math.ceil(length / 2);
|
|
148
|
+
return any(byteCount).toString("hex").slice(0, length);
|
|
149
|
+
}
|
|
150
|
+
function randomBase64(args) {
|
|
151
|
+
const byteCount = typeof args[0] === "number" ? args[0] : 32;
|
|
152
|
+
const urlSafe = !!args[1];
|
|
153
|
+
const buf = any(byteCount);
|
|
154
|
+
return urlSafe ? buf.toString("base64url") : buf.toString("base64");
|
|
155
|
+
}
|
|
156
|
+
function fingerprint(args) {
|
|
157
|
+
const input = toString(args[0]);
|
|
158
|
+
const md5Hash = hashWith("md5", input);
|
|
159
|
+
const sha256Hash = hashWith("sha256", input);
|
|
160
|
+
const combined = `${md5Hash}:${sha256Hash}`;
|
|
161
|
+
const final = hashWith("sha256", combined);
|
|
162
|
+
return {
|
|
163
|
+
md5: md5Hash,
|
|
164
|
+
sha256: sha256Hash,
|
|
165
|
+
fingerprint: final,
|
|
166
|
+
length: input.length,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
// ── Exports ──────────────────────────────────────────────────────────────────
|
|
170
|
+
export const HashFunctions = {
|
|
171
|
+
md5,
|
|
172
|
+
sha1,
|
|
173
|
+
sha256,
|
|
174
|
+
sha512,
|
|
175
|
+
sha3,
|
|
176
|
+
hmac,
|
|
177
|
+
hashFile,
|
|
178
|
+
hashStream,
|
|
179
|
+
crc32,
|
|
180
|
+
checksum,
|
|
181
|
+
compare,
|
|
182
|
+
uuid5,
|
|
183
|
+
randomBytes,
|
|
184
|
+
randomHex,
|
|
185
|
+
randomBase64,
|
|
186
|
+
fingerprint,
|
|
187
|
+
};
|
|
188
|
+
export const HashFunctionMetadata = {
|
|
189
|
+
md5: {
|
|
190
|
+
description: "Compute MD5 hash of a string",
|
|
191
|
+
parameters: [
|
|
192
|
+
{ name: "input", dataType: "string", formInputType: "text", required: true, description: "The string to hash" },
|
|
193
|
+
{ name: "encoding", dataType: "string", formInputType: "text", required: false, description: "Output encoding: 'hex' (default) or 'base64'" },
|
|
194
|
+
],
|
|
195
|
+
returnType: "object",
|
|
196
|
+
returnDescription: "API response.",
|
|
197
|
+
},
|
|
198
|
+
sha1: {
|
|
199
|
+
description: "Compute SHA-1 hash of a string",
|
|
200
|
+
parameters: [
|
|
201
|
+
{ name: "input", dataType: "string", formInputType: "text", required: true, description: "The string to hash" },
|
|
202
|
+
{ name: "encoding", dataType: "string", formInputType: "text", required: false, description: "Output encoding: 'hex' (default) or 'base64'" },
|
|
203
|
+
],
|
|
204
|
+
returnType: "object",
|
|
205
|
+
returnDescription: "API response.",
|
|
206
|
+
},
|
|
207
|
+
sha256: {
|
|
208
|
+
description: "Compute SHA-256 hash of a string",
|
|
209
|
+
parameters: [
|
|
210
|
+
{ name: "input", dataType: "string", formInputType: "text", required: true, description: "The string to hash" },
|
|
211
|
+
{ name: "encoding", dataType: "string", formInputType: "text", required: false, description: "Output encoding: 'hex' (default) or 'base64'" },
|
|
212
|
+
],
|
|
213
|
+
returnType: "object",
|
|
214
|
+
returnDescription: "API response.",
|
|
215
|
+
},
|
|
216
|
+
sha512: {
|
|
217
|
+
description: "Compute SHA-512 hash of a string",
|
|
218
|
+
parameters: [
|
|
219
|
+
{ name: "input", dataType: "string", formInputType: "text", required: true, description: "The string to hash" },
|
|
220
|
+
{ name: "encoding", dataType: "string", formInputType: "text", required: false, description: "Output encoding: 'hex' (default) or 'base64'" },
|
|
221
|
+
],
|
|
222
|
+
returnType: "object",
|
|
223
|
+
returnDescription: "API response.",
|
|
224
|
+
},
|
|
225
|
+
sha3: {
|
|
226
|
+
description: "Compute SHA-3 hash of a string",
|
|
227
|
+
parameters: [
|
|
228
|
+
{ name: "input", dataType: "string", formInputType: "text", required: true, description: "The string to hash" },
|
|
229
|
+
{ name: "bits", dataType: "number", formInputType: "number", required: false, description: "Hash bit length: 224, 256 (default), 384, or 512" },
|
|
230
|
+
{ name: "encoding", dataType: "string", formInputType: "text", required: false, description: "Output encoding: 'hex' (default) or 'base64'" },
|
|
231
|
+
],
|
|
232
|
+
returnType: "object",
|
|
233
|
+
returnDescription: "API response.",
|
|
234
|
+
},
|
|
235
|
+
hmac: {
|
|
236
|
+
description: "Compute HMAC of a string with a secret key",
|
|
237
|
+
parameters: [
|
|
238
|
+
{ name: "input", dataType: "string", formInputType: "text", required: true, description: "The string to hash" },
|
|
239
|
+
{ name: "key", dataType: "string", formInputType: "text", required: true, description: "The secret key" },
|
|
240
|
+
{ name: "algorithm", dataType: "string", formInputType: "text", required: false, description: "Hash algorithm (default: 'sha256')" },
|
|
241
|
+
{ name: "encoding", dataType: "string", formInputType: "text", required: false, description: "Output encoding: 'hex' (default) or 'base64'" },
|
|
242
|
+
],
|
|
243
|
+
returnType: "object",
|
|
244
|
+
returnDescription: "API response.",
|
|
245
|
+
},
|
|
246
|
+
hashFile: {
|
|
247
|
+
description: "Compute the hash of a file's contents",
|
|
248
|
+
parameters: [
|
|
249
|
+
{ name: "filePath", dataType: "string", formInputType: "text", required: true, description: "Absolute path to the file" },
|
|
250
|
+
{ name: "algorithm", dataType: "string", formInputType: "text", required: false, description: "Hash algorithm (default: 'sha256')" },
|
|
251
|
+
{ name: "encoding", dataType: "string", formInputType: "text", required: false, description: "Output encoding: 'hex' (default) or 'base64'" },
|
|
252
|
+
],
|
|
253
|
+
returnType: "object",
|
|
254
|
+
returnDescription: "API response.",
|
|
255
|
+
},
|
|
256
|
+
hashStream: {
|
|
257
|
+
description: "Compute a hash from an array of data chunks (simulates stream hashing)",
|
|
258
|
+
parameters: [
|
|
259
|
+
{ name: "chunks", dataType: "array", formInputType: "json", required: true, description: "Array of strings or buffers to hash" },
|
|
260
|
+
{ name: "algorithm", dataType: "string", formInputType: "text", required: false, description: "Hash algorithm (default: 'sha256')" },
|
|
261
|
+
{ name: "encoding", dataType: "string", formInputType: "text", required: false, description: "Output encoding: 'hex' (default) or 'base64'" },
|
|
262
|
+
],
|
|
263
|
+
returnType: "object",
|
|
264
|
+
returnDescription: "API response.",
|
|
265
|
+
},
|
|
266
|
+
crc32: {
|
|
267
|
+
description: "Compute CRC32 checksum of a string",
|
|
268
|
+
parameters: [
|
|
269
|
+
{ name: "input", dataType: "string", formInputType: "text", required: true, description: "The string to checksum" },
|
|
270
|
+
{ name: "asHex", dataType: "boolean", formInputType: "checkbox", required: false, description: "Return as hex string instead of number (default: false)" },
|
|
271
|
+
],
|
|
272
|
+
returnType: "object",
|
|
273
|
+
returnDescription: "API response.",
|
|
274
|
+
},
|
|
275
|
+
checksum: {
|
|
276
|
+
description: "Verify that a string matches an expected hash",
|
|
277
|
+
parameters: [
|
|
278
|
+
{ name: "input", dataType: "string", formInputType: "text", required: true, description: "The string to verify" },
|
|
279
|
+
{ name: "expectedHash", dataType: "string", formInputType: "text", required: true, description: "The expected hash value" },
|
|
280
|
+
{ name: "algorithm", dataType: "string", formInputType: "text", required: false, description: "Hash algorithm (default: 'sha256')" },
|
|
281
|
+
],
|
|
282
|
+
returnType: "object",
|
|
283
|
+
returnDescription: "API response.",
|
|
284
|
+
},
|
|
285
|
+
compare: {
|
|
286
|
+
description: "Timing-safe comparison of two strings to prevent timing attacks",
|
|
287
|
+
parameters: [
|
|
288
|
+
{ name: "a", dataType: "string", formInputType: "text", required: true, description: "First string" },
|
|
289
|
+
{ name: "b", dataType: "string", formInputType: "text", required: true, description: "Second string" },
|
|
290
|
+
],
|
|
291
|
+
returnType: "object",
|
|
292
|
+
returnDescription: "API response.",
|
|
293
|
+
},
|
|
294
|
+
uuid5: {
|
|
295
|
+
description: "Generate a deterministic UUID v5 from a name and namespace",
|
|
296
|
+
parameters: [
|
|
297
|
+
{ name: "name", dataType: "string", formInputType: "text", required: true, description: "The name to generate UUID from" },
|
|
298
|
+
{ name: "namespace", dataType: "string", formInputType: "text", required: false, description: "Namespace UUID (default: DNS namespace)" },
|
|
299
|
+
],
|
|
300
|
+
returnType: "object",
|
|
301
|
+
returnDescription: "API response.",
|
|
302
|
+
},
|
|
303
|
+
randomBytes: {
|
|
304
|
+
description: "Generate cryptographically secure random bytes",
|
|
305
|
+
parameters: [
|
|
306
|
+
{ name: "size", dataType: "number", formInputType: "number", required: false, description: "Number of bytes (default: 32)" },
|
|
307
|
+
{ name: "encoding", dataType: "string", formInputType: "text", required: false, description: "Output encoding: 'hex' (default), 'base64', 'buffer'" },
|
|
308
|
+
],
|
|
309
|
+
returnType: "object",
|
|
310
|
+
returnDescription: "API response.",
|
|
311
|
+
},
|
|
312
|
+
randomHex: {
|
|
313
|
+
description: "Generate a random hexadecimal string of specified length",
|
|
314
|
+
parameters: [
|
|
315
|
+
{ name: "length", dataType: "number", formInputType: "number", required: false, description: "Length of hex string (default: 32)" },
|
|
316
|
+
],
|
|
317
|
+
returnType: "object",
|
|
318
|
+
returnDescription: "API response.",
|
|
319
|
+
},
|
|
320
|
+
randomBase64: {
|
|
321
|
+
description: "Generate a random Base64-encoded string",
|
|
322
|
+
parameters: [
|
|
323
|
+
{ name: "byteCount", dataType: "number", formInputType: "number", required: false, description: "Number of random bytes (default: 32)" },
|
|
324
|
+
{ name: "urlSafe", dataType: "boolean", formInputType: "checkbox", required: false, description: "Use URL-safe Base64 (default: false)" },
|
|
325
|
+
],
|
|
326
|
+
returnType: "object",
|
|
327
|
+
returnDescription: "API response.",
|
|
328
|
+
},
|
|
329
|
+
fingerprint: {
|
|
330
|
+
description: "Generate a content fingerprint combining MD5 and SHA-256 hashes",
|
|
331
|
+
parameters: [
|
|
332
|
+
{ name: "input", dataType: "string", formInputType: "text", required: true, description: "The content to fingerprint" },
|
|
333
|
+
],
|
|
334
|
+
returnType: "object",
|
|
335
|
+
returnDescription: "API response.",
|
|
336
|
+
},
|
|
337
|
+
};
|
|
338
|
+
export const HashModuleMetadata = {
|
|
339
|
+
description: "Cryptographic hashing utilities: MD5, SHA family, HMAC, CRC32, file hashing, UUID v5 generation, secure random bytes, and content fingerprinting",
|
|
340
|
+
version: "1.0.0",
|
|
341
|
+
tags: ["hash", "crypto", "checksum", "hmac", "uuid", "random", "fingerprint", "security"],
|
|
342
|
+
};
|
|
343
|
+
//# sourceMappingURL=hash.js.map
|
package/dist/hash.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash.js","sourceRoot":"","sources":["../src/hash.ts"],"names":[],"mappings":"AAKA,gFAAgF;AAEhF,SAAS,QAAQ,CAAC,CAAU;IAC1B,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,CAAC,CAAC;IACpC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IAC7C,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAClD,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;AACnB,CAAC;AAED,SAAS,QAAQ,CAAC,SAAiB,EAAE,IAAY,EAAE,WAA6B,KAAK;IACnF,OAAO,GAAG,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC9D,CAAC;AAED,qBAAqB;AACrB,MAAM,WAAW,GAAa,CAAC,GAAG,EAAE;IAClC,MAAM,KAAK,GAAa,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;IACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7B,IAAI,GAAG,GAAG,CAAC,CAAC;QACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC3B,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC;QACvD,CAAC;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
export default HashModule;
|
|
4
|
+
export { HashModule };
|
|
5
|
+
export { HashFunctions, HashFunctionMetadata, HashModuleMetadata } from "./hash.js";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,QAAA,MAAM,UAAU,EAAE,aAAmK,CAAC;AACtL,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HashFunctions, HashFunctionMetadata, HashModuleMetadata } from "./hash.js";
|
|
2
|
+
const HashModule = { name: "hash", functions: HashFunctions, functionMetadata: HashFunctionMetadata, moduleMetadata: HashModuleMetadata, global: false };
|
|
3
|
+
export default HashModule;
|
|
4
|
+
export { HashModule };
|
|
5
|
+
export { HashFunctions, HashFunctionMetadata, HashModuleMetadata } from "./hash.js";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpF,MAAM,UAAU,GAAkB,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,oBAA2B,EAAE,cAAc,EAAE,kBAAyB,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AACtL,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@robinpath/hash",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"publishConfig": { "access": "public" },
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": { ".": { "import": "./dist/index.js", "types": "./dist/index.d.ts" } },
|
|
9
|
+
"files": ["dist"],
|
|
10
|
+
"scripts": { "build": "tsc", "test": "node --import tsx --test tests/*.test.ts" },
|
|
11
|
+
"peerDependencies": { "@wiredwp/robinpath": ">=0.20.0" },
|
|
12
|
+
"devDependencies": { "@wiredwp/robinpath": "^0.30.1", "tsx": "^4.19.0", "typescript": "^5.6.0" }
|
|
13
|
+
}
|