From 7370f2f85b0338543116c917d91c8f95305c030c Mon Sep 17 00:00:00 2001 From: testudor Date: Tue, 22 Jul 2025 16:49:16 +0200 Subject: [PATCH] hex->base64 --- src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 8c8138d..6a80b00 100644 --- a/src/index.ts +++ b/src/index.ts @@ -31,7 +31,10 @@ export function getPathAndParam( export function getSubsetHash(subset: string): string { const subsetChars = [...subset]; const subsetCharsSorted = subsetChars.sort(); - const subsetHash = hash(subsetCharsSorted, { algorithm: "md5" }); + const subsetHash = hash(subsetCharsSorted, { + algorithm: "md5", + encoding: "base64", + }); const truncatedHash = subsetHash.slice(0, 8);