@dnax/core 0.70.4 → 0.70.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils/index.ts +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.70.4",
3
+ "version": "0.70.5",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {},
package/utils/index.ts CHANGED
@@ -551,10 +551,10 @@ function containsForbiddenOperators(
551
551
  }
552
552
 
553
553
  // create key hash with bun hash
554
- async function useKey(
554
+ function useKey(
555
555
  key: object | string,
556
556
  algorithm: SupportedCryptoAlgorithms = "sha256"
557
- ) {
557
+ ): string {
558
558
  if (!key) throw new Error("key is required");
559
559
  let hashKey = null;
560
560
  if (typeof key == "string") {
@@ -567,6 +567,7 @@ async function useKey(
567
567
  let hasher = new Bun.CryptoHasher(algorithm || "sha256");
568
568
  hasher.update(hashKey as any);
569
569
  let n = hasher.digest("base64");
570
+ return n;
570
571
  }
571
572
 
572
573
  const contextError = ContextError;