@dfinity/principal
Advanced tools
Comparing version 0.9.3 to 0.10.0-beta.1
@@ -63,3 +63,3 @@ "use strict"; | ||
view.setUint32(0, getCrc_1.getCrc32(this._arr)); | ||
const checksum = Uint8Array.from(Buffer.from(checksumArrayBuf)); | ||
const checksum = new Uint8Array(checksumArrayBuf); | ||
const bytes = Uint8Array.from(this._arr); | ||
@@ -66,0 +66,0 @@ const array = new Uint8Array([...checksum, ...bytes]); |
/** | ||
* | ||
* Returns the SHA224 hash of the buffer. | ||
* @param data Arraybuffer to encode | ||
* @returns sha244-encoded BinaryBlob | ||
*/ | ||
export declare function sha224(data: ArrayBuffer): Uint8Array; |
@@ -6,5 +6,4 @@ "use strict"; | ||
/** | ||
* | ||
* Returns the SHA224 hash of the buffer. | ||
* @param data Arraybuffer to encode | ||
* @returns sha244-encoded BinaryBlob | ||
*/ | ||
@@ -11,0 +10,0 @@ function sha224(data) { |
@@ -60,3 +60,3 @@ import { decode, encode } from './utils/base32'; | ||
view.setUint32(0, getCrc32(this._arr)); | ||
const checksum = Uint8Array.from(Buffer.from(checksumArrayBuf)); | ||
const checksum = new Uint8Array(checksumArrayBuf); | ||
const bytes = Uint8Array.from(this._arr); | ||
@@ -63,0 +63,0 @@ const array = new Uint8Array([...checksum, ...bytes]); |
/** | ||
* | ||
* Returns the SHA224 hash of the buffer. | ||
* @param data Arraybuffer to encode | ||
* @returns sha244-encoded BinaryBlob | ||
*/ | ||
export declare function sha224(data: ArrayBuffer): Uint8Array; |
import { sha224 as jsSha224 } from 'js-sha256'; | ||
/** | ||
* | ||
* Returns the SHA224 hash of the buffer. | ||
* @param data Arraybuffer to encode | ||
* @returns sha244-encoded BinaryBlob | ||
*/ | ||
@@ -7,0 +6,0 @@ export function sha224(data) { |
{ | ||
"name": "@dfinity/principal", | ||
"version": "0.9.3", | ||
"version": "0.10.0-beta.1", | ||
"author": "DFINITY Stiftung <sdk@dfinity.org>", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
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
186251
531