Skip to content

Commit 45f64b5

Browse files
committed
feat: export hashInto() and digest64Into()
1 parent 018c1fb commit 45f64b5

File tree

1 file changed

+8
-0
lines changed
  • packages/persistent-merkle-tree/src/hasher

1 file changed

+8
-0
lines changed

packages/persistent-merkle-tree/src/hasher/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,18 @@ export function setHasher(newHasher: Hasher): void {
1919
hasher = newHasher;
2020
}
2121

22+
export function hashInto(data: Uint8Array, output: Uint8Array): void {
23+
hasher.hashInto(data, output);
24+
}
25+
2226
export function digest64(a: Uint8Array, b: Uint8Array): Uint8Array {
2327
return hasher.digest64(a, b);
2428
}
2529

30+
export function digest64Into(a: Uint8Array, b: Uint8Array, output: Uint8Array): void {
31+
hasher.digest64Into(a, b, output);
32+
}
33+
2634
export function digestNLevel(data: Uint8Array, nLevel: number): Uint8Array {
2735
return hasher.digestNLevel(data, nLevel);
2836
}

0 commit comments

Comments
 (0)