/opt/canhelp/node_modules/@noble/hashes
NameSizeModeActions
src/-0755rm
argon2.d.ts14980644editdlrm
argon2.d.ts.map11370644editdlrm
argon2.js163080644editdlrm
argon2.js.map211130644editdlrm
blake1.d.ts36240644editdlrm
blake1.d.ts.map37430644editdlrm
blake1.js194330644editdlrm
blake1.js.map284540644editdlrm
blake2.d.ts39070644editdlrm
blake2.d.ts.map41030644editdlrm
blake2.js168950644editdlrm
blake2.js.map255430644editdlrm
blake3.d.ts18370644editdlrm
blake3.d.ts.map12960644editdlrm
blake3.js96270644editdlrm
blake3.js.map107530644editdlrm
eskdf.d.ts17520644editdlrm
eskdf.d.ts.map9020644editdlrm
eskdf.js65500644editdlrm
eskdf.js.map60070644editdlrm
hkdf.d.ts19960644editdlrm
hkdf.d.ts.map5530644editdlrm
hkdf.js35380644editdlrm
hkdf.js.map21470644editdlrm
hmac.d.ts10900644editdlrm
hmac.d.ts.map9340644editdlrm
hmac.js29920644editdlrm
hmac.js.map30670644editdlrm
index.d.ts460644editdlrm
index.d.ts.map1010644editdlrm
index.js11620644editdlrm
index.js.map1800644editdlrm
legacy.d.ts25790644editdlrm
legacy.d.ts.map18880644editdlrm
legacy.js97630644editdlrm
legacy.js.map134980644editdlrm
LICENSE11090644editdlrm
package.json27990644editdlrm
pbkdf2.d.ts11940644editdlrm
pbkdf2.d.ts.map5760644editdlrm
pbkdf2.js38980644editdlrm
pbkdf2.js.map40500644editdlrm
README.md240150644editdlrm
scrypt.d.ts13370644editdlrm
scrypt.d.ts.map6580644editdlrm
scrypt.js97200644editdlrm
scrypt.js.map121360644editdlrm
sha2.d.ts65120644editdlrm
sha2.d.ts.map63590644editdlrm
sha2.js167730644editdlrm
sha2.js.map200620644editdlrm
sha3-addons.d.ts62320644editdlrm
sha3-addons.d.ts.map44190644editdlrm
sha3-addons.js170280644editdlrm
sha3-addons.js.map174830644editdlrm
sha3.d.ts23250644editdlrm
sha3.d.ts.map19330644editdlrm
sha3.js91990644editdlrm
sha3.js.map106900644editdlrm
utils.d.ts61280644editdlrm
utils.d.ts.map41170644editdlrm
utils.js93560644editdlrm
utils.js.map91270644editdlrm
webcrypto.d.ts27180644editdlrm
webcrypto.d.ts.map10990644editdlrm
webcrypto.js50900644editdlrm
webcrypto.js.map39690644editdlrm
_blake.d.ts4740644editdlrm
_blake.d.ts.map5530644editdlrm
_blake.js16610644editdlrm
_blake.js.map36280644editdlrm
_md.d.ts19680644editdlrm
_md.d.ts.map15180644editdlrm
_md.js56150644editdlrm
_md.js.map50650644editdlrm
_u64.d.ts31290644editdlrm
_u64.d.ts.map43140644editdlrm
_u64.js30810644editdlrm
_u64.js.map50450644editdlrm
Edit: /opt/canhelp/node_modules/@noble/hashes/utils.d.ts (6128B)
/** * Utilities for hex, bytes, CSPRNG. * @module */ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */ /** Checks if something is Uint8Array. Be careful: nodejs Buffer will return true. */ export declare function isBytes(a: unknown): a is Uint8Array; /** Asserts something is positive integer. */ export declare function anumber(n: number, title?: string): void; /** Asserts something is Uint8Array. */ export declare function abytes(value: Uint8Array, length?: number, title?: string): Uint8Array; /** Asserts something is hash */ export declare function ahash(h: CHash): void; /** Asserts a hash instance has not been destroyed / finished */ export declare function aexists(instance: any, checkFinished?: boolean): void; /** Asserts output is properly-sized byte array */ export declare function aoutput(out: any, instance: any): void; /** Generic type encompassing 8/16/32-byte arrays - but not 64-byte. */ export type TypedArray = Int8Array | Uint8ClampedArray | Uint8Array | Uint16Array | Int16Array | Uint32Array | Int32Array; /** Cast u8 / u16 / u32 to u8. */ export declare function u8(arr: TypedArray): Uint8Array; /** Cast u8 / u16 / u32 to u32. */ export declare function u32(arr: TypedArray): Uint32Array; /** Zeroize a byte array. Warning: JS provides no guarantees. */ export declare function clean(...arrays: TypedArray[]): void; /** Create DataView of an array for easy byte-level manipulation. */ export declare function createView(arr: TypedArray): DataView; /** The rotate right (circular right shift) operation for uint32 */ export declare function rotr(word: number, shift: number): number; /** The rotate left (circular left shift) operation for uint32 */ export declare function rotl(word: number, shift: number): number; /** Is current platform little-endian? Most are. Big-Endian platform: IBM */ export declare const isLE: boolean; /** The byte swap operation for uint32 */ export declare function byteSwap(word: number): number; /** Conditionally byte swap if on a big-endian platform */ export declare const swap8IfBE: (n: number) => number; /** In place byte swap for Uint32Array */ export declare function byteSwap32(arr: Uint32Array): Uint32Array; export declare const swap32IfBE: (u: Uint32Array) => Uint32Array; /** * Convert byte array to hex string. Uses built-in function, when available. * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123' */ export declare function bytesToHex(bytes: Uint8Array): string; /** * Convert hex string to byte array. Uses built-in function, when available. * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23]) */ export declare function hexToBytes(hex: string): Uint8Array; /** * There is no setImmediate in browser and setTimeout is slow. * Call of async fn will return Promise, which will be fullfiled only on * next scheduler queue processing step and this is exactly what we need. */ export declare const nextTick: () => Promise; /** Returns control to thread each 'tick' ms to avoid blocking. */ export declare function asyncLoop(iters: number, tick: number, cb: (i: number) => void): Promise; /** * Converts string to bytes using UTF8 encoding. * Built-in doesn't validate input to be string: we do the check. * @example utf8ToBytes('abc') // Uint8Array.from([97, 98, 99]) */ export declare function utf8ToBytes(str: string): Uint8Array; /** KDFs can accept string or Uint8Array for user convenience. */ export type KDFInput = string | Uint8Array; /** * Helper for KDFs: consumes uint8array or string. * When string is passed, does utf8 decoding, using TextDecoder. */ export declare function kdfInputToBytes(data: KDFInput, errorTitle?: string): Uint8Array; /** Copies several Uint8Arrays into one. */ export declare function concatBytes(...arrays: Uint8Array[]): Uint8Array; type EmptyObj = {}; /** Merges default options and passed options. */ export declare function checkOpts(defaults: T1, opts?: T2): T1 & T2; /** Common interface for all hashes. */ export interface Hash { blockLen: number; outputLen: number; update(buf: Uint8Array): this; digestInto(buf: Uint8Array): void; digest(): Uint8Array; destroy(): void; _cloneInto(to?: T): T; clone(): T; } /** PseudoRandom (number) Generator */ export interface PRG { addEntropy(seed: Uint8Array): void; randomBytes(length: number): Uint8Array; clean(): void; } /** * XOF: streaming API to read digest in chunks. * Same as 'squeeze' in keccak/k12 and 'seek' in blake3, but more generic name. * When hash used in XOF mode it is up to user to call '.destroy' afterwards, since we cannot * destroy state, next call can require more bytes. */ export type HashXOF> = Hash & { xof(bytes: number): Uint8Array; xofInto(buf: Uint8Array): Uint8Array; }; /** Hash constructor */ export type HasherCons = Opts extends undefined ? () => T : (opts?: Opts) => T; /** Optional hash params. */ export type HashInfo = { oid?: Uint8Array; }; /** Hash function */ export type CHash = Hash, Opts = undefined> = { outputLen: number; blockLen: number; } & HashInfo & (Opts extends undefined ? { (msg: Uint8Array): Uint8Array; create(): T; } : { (msg: Uint8Array, opts?: Opts): Uint8Array; create(opts?: Opts): T; }); /** XOF with output */ export type CHashXOF = HashXOF, Opts = undefined> = CHash; /** Creates function with outputLen, blockLen, create properties from a class constructor. */ export declare function createHasher, Opts = undefined>(hashCons: HasherCons, info?: HashInfo): CHash; /** Cryptographically secure PRNG. Uses internal OS-level `crypto.getRandomValues`. */ export declare function randomBytes(bytesLength?: number): Uint8Array; /** Creates OID opts for NIST hashes, with prefix 06 09 60 86 48 01 65 03 04 02. */ export declare const oidNist: (suffix: number) => Required; export {}; //# sourceMappingURL=utils.d.ts.map