UNPKG
@traceprompt/node
Version:
latest (1.2.0)
1.2.0
1.1.0
1.0.3
1.0.2
1.0.1
1.0.0
0.1.1
0.1.0
Client-side encrypted, audit-ready logging for LLM applications
@traceprompt/node
/
src
/
crypto
/
hasher.ts
9 lines
(7 loc)
•
212 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
import
{ blake3 }
from
"@napi-rs/blake-hash"
;
export
function
computeLeaf
(
data
:
string
|
Buffer
|
undefined
):
string
{
if
(data ===
undefined
) { data =
"null"
; }
return
blake3
(data).
toString
(
"hex"
); }