diff options
| author | akiyamn | 2023-09-24 23:22:21 +1000 |
|---|---|---|
| committer | akiyamn | 2023-09-24 23:22:21 +1000 |
| commit | 4e87195739f2a5d9a05451b48773c8afdc680765 (patch) | |
| tree | 9cba501844a4a11dcbdffc4050ed8189561c55ed /node_modules/blake3-wasm/esm/base/test-helpers.d.ts | |
| download | price-tracker-worker-4e87195739f2a5d9a05451b48773c8afdc680765.tar.gz price-tracker-worker-4e87195739f2a5d9a05451b48773c8afdc680765.zip | |
Initial commit (by create-cloudflare CLI)
Diffstat (limited to 'node_modules/blake3-wasm/esm/base/test-helpers.d.ts')
| -rw-r--r-- | node_modules/blake3-wasm/esm/base/test-helpers.d.ts | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/node_modules/blake3-wasm/esm/base/test-helpers.d.ts b/node_modules/blake3-wasm/esm/base/test-helpers.d.ts new file mode 100644 index 0000000..9b4b3dd --- /dev/null +++ b/node_modules/blake3-wasm/esm/base/test-helpers.d.ts @@ -0,0 +1,41 @@ +/// <reference types="node" /> +export declare const hello48: Buffer; +export declare const inputs: { + large: { + input: string; + hash: Buffer; + }; + hello: { + input: string; + hash: Buffer; + }; + goodbye: { + input: string; + hash: Buffer; + }; +}; +/** + * Test vectors from the BLAKE3 repo. + * + * > Each test is an input length and three outputs, one for each of the hash, + * > keyedHash, and deriveKey modes. The input in each case is filled with a + * > 251-byte-long repeating pattern: 0, 1, 2, ..., 249, 250, 0, 1, ... The + * > key used with keyedHash is the 32-byte ASCII string given in the 'key' + * > field below. For deriveKey, the test input is used as the input key, and + * > the context string is 'BLAKE3 2019-12-27 6:29:52 example context'. + * > (As good practice for following the security requirements of deriveKey, + * > test runners should make that context string a hardcoded constant, and we + * > do not provided it in machine-readable form.) Outputs are encoded as + * > hexadecimal. Each case is an extended output, and implementations should + * > also check that the first 32 bytes match their default-length output. + */ +export declare const ogTestVectors: { + key: string; + context: string; + cases: { + inputLen: number; + expectedHash: string; + expectedKeyed: string; + expectedDerive: string; + }[]; +}; |
