mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-22 04:27:59 +00:00
chore: update to version 14.0.11 and align website URLs
This commit is contained in:
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @name shaAsU8a
|
||||
* @summary Creates a sha Uint8Array from the input.
|
||||
*/
|
||||
export declare const shaAsU8a: (value: string | Uint8Array, bitLength?: 256 | 512, onlyJs?: boolean) => Uint8Array;
|
||||
/**
|
||||
* @name sha256AsU8a
|
||||
* @summary Creates a sha256 Uint8Array from the input.
|
||||
*/
|
||||
export declare const sha256AsU8a: (data: string | Uint8Array, onlyJs?: boolean) => Uint8Array;
|
||||
/**
|
||||
* @name sha512AsU8a
|
||||
* @summary Creates a sha512 Uint8Array from the input.
|
||||
*/
|
||||
export declare const sha512AsU8a: (data: string | Uint8Array, onlyJs?: boolean) => Uint8Array;
|
||||
@@ -0,0 +1,19 @@
|
||||
import { sha256 as sha256Js } from '@noble/hashes/sha256';
|
||||
import { sha512 as sha512Js } from '@noble/hashes/sha512';
|
||||
import { sha256, sha512 } from '@pezkuwi/wasm-crypto';
|
||||
import { createBitHasher, createDualHasher } from '../helpers.js';
|
||||
/**
|
||||
* @name shaAsU8a
|
||||
* @summary Creates a sha Uint8Array from the input.
|
||||
*/
|
||||
export const shaAsU8a = /*#__PURE__*/ createDualHasher({ 256: sha256, 512: sha512 }, { 256: sha256Js, 512: sha512Js });
|
||||
/**
|
||||
* @name sha256AsU8a
|
||||
* @summary Creates a sha256 Uint8Array from the input.
|
||||
*/
|
||||
export const sha256AsU8a = /*#__PURE__*/ createBitHasher(256, shaAsU8a);
|
||||
/**
|
||||
* @name sha512AsU8a
|
||||
* @summary Creates a sha512 Uint8Array from the input.
|
||||
*/
|
||||
export const sha512AsU8a = /*#__PURE__*/ createBitHasher(512, shaAsU8a);
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* @summary Implements Sha-256/512 hashing functions for a variety of input and outputs
|
||||
*/
|
||||
export { sha256AsU8a, sha512AsU8a, shaAsU8a } from './asU8a.js';
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* @summary Implements Sha-256/512 hashing functions for a variety of input and outputs
|
||||
*/
|
||||
export { sha256AsU8a, sha512AsU8a, shaAsU8a } from './asU8a.js';
|
||||
Reference in New Issue
Block a user