@atcute/uint8array
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -14,5 +14,3 @@ import { allocUnsafe as _allocUnsafe, concatArrayBuffers as _concat } from 'bun'; | ||
}; | ||
export const allocUnsafe = (size) => { | ||
return _allocUnsafe(size); | ||
}; | ||
export const allocUnsafe = _allocUnsafe; | ||
export const compare = (a, b) => { | ||
@@ -38,4 +36,4 @@ return _compare.call(a, b); | ||
export const toSha256 = async (buffer) => { | ||
return toUint8Array(_hash('SHA-256', buffer, 'buffer')); | ||
return toUint8Array(_hash('sha256', buffer, 'buffer')); | ||
}; | ||
//# sourceMappingURL=index.bun.js.map |
const textEncoder = new TextEncoder(); | ||
const textDecoder = new TextDecoder(); | ||
const subtle = /*#__PURE__*/ crypto.subtle; | ||
const subtle = crypto.subtle; | ||
/** | ||
@@ -5,0 +5,0 @@ * creates an Uint8Array of the requested size, with the contents zeroed |
@@ -38,4 +38,4 @@ import { Buffer as NodeBuffer } from 'node:buffer'; | ||
export const toSha256 = async (buffer) => { | ||
return toUint8Array(_hash('SHA-256', buffer, 'buffer')); | ||
return toUint8Array(_hash('sha256', buffer, 'buffer')); | ||
}; | ||
//# sourceMappingURL=index.node.js.map |
@@ -19,5 +19,3 @@ import { allocUnsafe as _allocUnsafe, concatArrayBuffers as _concat } from 'bun'; | ||
export const allocUnsafe = (size: number): Uint8Array => { | ||
return _allocUnsafe(size); | ||
}; | ||
export const allocUnsafe: (size: number) => Uint8Array = _allocUnsafe; | ||
@@ -54,3 +52,3 @@ export const compare = (a: Uint8Array, b: Uint8Array): number => { | ||
export const toSha256 = async (buffer: Uint8Array): Promise<Uint8Array> => { | ||
return toUint8Array(_hash('SHA-256', buffer, 'buffer')); | ||
return toUint8Array(_hash('sha256', buffer, 'buffer')); | ||
}; |
@@ -54,3 +54,3 @@ import { Buffer as NodeBuffer } from 'node:buffer'; | ||
export const toSha256 = async (buffer: Uint8Array): Promise<Uint8Array> => { | ||
return toUint8Array(_hash('SHA-256', buffer, 'buffer')); | ||
return toUint8Array(_hash('sha256', buffer, 'buffer')); | ||
}; |
const textEncoder = new TextEncoder(); | ||
const textDecoder = new TextDecoder(); | ||
const subtle = /*#__PURE__*/ crypto.subtle; | ||
const subtle = crypto.subtle; | ||
@@ -6,0 +6,0 @@ /** |
{ | ||
"type": "module", | ||
"name": "@atcute/uint8array", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "uint8array utilities", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
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
24941
467