Skip to content

Commit

Permalink
Update ripemd160.js
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinLinus authored Nov 27, 2023
1 parent d831872 commit ef2919c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ripemd160.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
let ripemd160_wasm_exports = undefined
if (!ripemd160_wasm_exports) {
const fileUrl = import.meta.url.replace(/\.js$/, '.wasm');
const ripemd160_wasm = await (await fetch(fileUrl)).arrayBuffer()
ripemd160_wasm_exports = (await WebAssembly.instantiate(ripemd160_wasm)).instance.exports
}
const fileUrl = import.meta.url.replace(/\.js$/, '.wasm');
const ripemd160_wasm = await (await fetch(fileUrl)).arrayBuffer()
const ripemd160_wasm_exports = (await WebAssembly.instantiate(ripemd160_wasm)).instance.exports

export function ripemd160(data) {
const wasm_data = new Uint8Array(ripemd160_wasm_exports.memory.buffer, 0, data.length)
Expand Down

0 comments on commit ef2919c

Please sign in to comment.