/
opt
/
canhelp
/
node_modules
/
@noble
/
hashes
/
/opt/canhelp/node_modules/@noble/hashes
mkdir
upload
Name
Size
Mode
Actions
src/
-
0755
rm
argon2.d.ts
1498
0644
edit
dl
rm
argon2.d.ts.map
1137
0644
edit
dl
rm
argon2.js
16308
0644
edit
dl
rm
argon2.js.map
21113
0644
edit
dl
rm
blake1.d.ts
3624
0644
edit
dl
rm
blake1.d.ts.map
3743
0644
edit
dl
rm
blake1.js
19433
0644
edit
dl
rm
blake1.js.map
28454
0644
edit
dl
rm
blake2.d.ts
3907
0644
edit
dl
rm
blake2.d.ts.map
4103
0644
edit
dl
rm
blake2.js
16895
0644
edit
dl
rm
blake2.js.map
25543
0644
edit
dl
rm
blake3.d.ts
1837
0644
edit
dl
rm
blake3.d.ts.map
1296
0644
edit
dl
rm
blake3.js
9627
0644
edit
dl
rm
blake3.js.map
10753
0644
edit
dl
rm
eskdf.d.ts
1752
0644
edit
dl
rm
eskdf.d.ts.map
902
0644
edit
dl
rm
eskdf.js
6550
0644
edit
dl
rm
eskdf.js.map
6007
0644
edit
dl
rm
hkdf.d.ts
1996
0644
edit
dl
rm
hkdf.d.ts.map
553
0644
edit
dl
rm
hkdf.js
3538
0644
edit
dl
rm
hkdf.js.map
2147
0644
edit
dl
rm
hmac.d.ts
1090
0644
edit
dl
rm
hmac.d.ts.map
934
0644
edit
dl
rm
hmac.js
2992
0644
edit
dl
rm
hmac.js.map
3067
0644
edit
dl
rm
index.d.ts
46
0644
edit
dl
rm
index.d.ts.map
101
0644
edit
dl
rm
index.js
1162
0644
edit
dl
rm
index.js.map
180
0644
edit
dl
rm
legacy.d.ts
2579
0644
edit
dl
rm
legacy.d.ts.map
1888
0644
edit
dl
rm
legacy.js
9763
0644
edit
dl
rm
legacy.js.map
13498
0644
edit
dl
rm
LICENSE
1109
0644
edit
dl
rm
package.json
2799
0644
edit
dl
rm
pbkdf2.d.ts
1194
0644
edit
dl
rm
pbkdf2.d.ts.map
576
0644
edit
dl
rm
pbkdf2.js
3898
0644
edit
dl
rm
pbkdf2.js.map
4050
0644
edit
dl
rm
README.md
24015
0644
edit
dl
rm
scrypt.d.ts
1337
0644
edit
dl
rm
scrypt.d.ts.map
658
0644
edit
dl
rm
scrypt.js
9720
0644
edit
dl
rm
scrypt.js.map
12136
0644
edit
dl
rm
sha2.d.ts
6512
0644
edit
dl
rm
sha2.d.ts.map
6359
0644
edit
dl
rm
sha2.js
16773
0644
edit
dl
rm
sha2.js.map
20062
0644
edit
dl
rm
sha3-addons.d.ts
6232
0644
edit
dl
rm
sha3-addons.d.ts.map
4419
0644
edit
dl
rm
sha3-addons.js
17028
0644
edit
dl
rm
sha3-addons.js.map
17483
0644
edit
dl
rm
sha3.d.ts
2325
0644
edit
dl
rm
sha3.d.ts.map
1933
0644
edit
dl
rm
sha3.js
9199
0644
edit
dl
rm
sha3.js.map
10690
0644
edit
dl
rm
utils.d.ts
6128
0644
edit
dl
rm
utils.d.ts.map
4117
0644
edit
dl
rm
utils.js
9356
0644
edit
dl
rm
utils.js.map
9127
0644
edit
dl
rm
webcrypto.d.ts
2718
0644
edit
dl
rm
webcrypto.d.ts.map
1099
0644
edit
dl
rm
webcrypto.js
5090
0644
edit
dl
rm
webcrypto.js.map
3969
0644
edit
dl
rm
_blake.d.ts
474
0644
edit
dl
rm
_blake.d.ts.map
553
0644
edit
dl
rm
_blake.js
1661
0644
edit
dl
rm
_blake.js.map
3628
0644
edit
dl
rm
_md.d.ts
1968
0644
edit
dl
rm
_md.d.ts.map
1518
0644
edit
dl
rm
_md.js
5615
0644
edit
dl
rm
_md.js.map
5065
0644
edit
dl
rm
_u64.d.ts
3129
0644
edit
dl
rm
_u64.d.ts.map
4314
0644
edit
dl
rm
_u64.js
3081
0644
edit
dl
rm
_u64.js.map
5045
0644
edit
dl
rm
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<void>; /** Returns control to thread each 'tick' ms to avoid blocking. */ export declare function asyncLoop(iters: number, tick: number, cb: (i: number) => void): Promise<void>; /** * 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<T1 extends EmptyObj, T2 extends EmptyObj>(defaults: T1, opts?: T2): T1 & T2; /** Common interface for all hashes. */ export interface Hash<T> { 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<T extends Hash<T>> = Hash<T> & { xof(bytes: number): Uint8Array; xofInto(buf: Uint8Array): Uint8Array; }; /** Hash constructor */ export type HasherCons<T, Opts = undefined> = Opts extends undefined ? () => T : (opts?: Opts) => T; /** Optional hash params. */ export type HashInfo = { oid?: Uint8Array; }; /** Hash function */ export type CHash<T extends Hash<T> = Hash<any>, 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<T extends HashXOF<T> = HashXOF<any>, Opts = undefined> = CHash<T, Opts>; /** Creates function with outputLen, blockLen, create properties from a class constructor. */ export declare function createHasher<T extends Hash<T>, Opts = undefined>(hashCons: HasherCons<T, Opts>, info?: HashInfo): CHash<T, Opts>; /** 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<HashInfo>; export {}; //# sourceMappingURL=utils.d.ts.map
Save
cmd:
run