@xyo-network/hash
Advanced tools
Comparing version 2.77.0 to 2.77.1
// src/PayloadHasher.ts | ||
import { base16 } from "@scure/base"; | ||
import { Buffer } from "@xylabs/buffer"; | ||
import { subtle } from "@xylabs/platform"; | ||
import { ObjectWrapper } from "@xyo-network/object"; | ||
import { WasmSupport } from "@xyo-network/wasm"; | ||
import { subtle } from "crypto"; | ||
import { sha256 } from "hash-wasm"; | ||
@@ -8,0 +8,0 @@ import shajs from "sha.js"; |
@@ -45,5 +45,5 @@ "use strict"; | ||
var import_buffer = require("@xylabs/buffer"); | ||
var import_platform = require("@xylabs/platform"); | ||
var import_object2 = require("@xyo-network/object"); | ||
var import_wasm = require("@xyo-network/wasm"); | ||
var import_crypto = require("crypto"); | ||
var import_hash_wasm = require("hash-wasm"); | ||
@@ -128,3 +128,3 @@ var import_sha = __toESM(require("sha.js")); | ||
const b = enc.encode(stringToHash); | ||
const hashArray = await import_crypto.subtle.digest("SHA-256", b); | ||
const hashArray = await import_platform.subtle.digest("SHA-256", b); | ||
return import_base.base16.encode(import_buffer.Buffer.from(hashArray)).toLowerCase(); | ||
@@ -131,0 +131,0 @@ } catch (ex) { |
@@ -14,7 +14,8 @@ { | ||
"@scure/base": "^1.1.3", | ||
"@xylabs/buffer": "^2.12.28", | ||
"@xylabs/lodash": "^2.12.28", | ||
"@xyo-network/object": "~2.77.0", | ||
"@xyo-network/typeof": "~2.77.0", | ||
"@xyo-network/wasm": "~2.77.0", | ||
"@xylabs/buffer": "^2.12.29", | ||
"@xylabs/lodash": "^2.12.29", | ||
"@xylabs/platform": "^2.12.29", | ||
"@xyo-network/object": "~2.77.1", | ||
"@xyo-network/typeof": "~2.77.1", | ||
"@xyo-network/wasm": "~2.77.1", | ||
"hash-wasm": "^4.10.0", | ||
@@ -69,3 +70,3 @@ "sha.js": "^2.4.11" | ||
"types": "dist/node/index.d.ts", | ||
"version": "2.77.0" | ||
"version": "2.77.1" | ||
} |
import { base16 } from '@scure/base' | ||
import { Buffer } from '@xylabs/buffer' | ||
import { subtle } from '@xylabs/platform' | ||
import { AnyObject, ObjectWrapper } from '@xyo-network/object' | ||
import { WasmSupport } from '@xyo-network/wasm' | ||
import { subtle } from 'crypto' | ||
import { sha256 } from 'hash-wasm' | ||
@@ -7,0 +7,0 @@ import shajs from 'sha.js' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
140287
9
+ Added@xylabs/platform@^2.12.29
Updated@xylabs/buffer@^2.12.29
Updated@xylabs/lodash@^2.12.29
Updated@xyo-network/object@~2.77.1
Updated@xyo-network/typeof@~2.77.1
Updated@xyo-network/wasm@~2.77.1