15 lines
891 B
TypeScript
15 lines
891 B
TypeScript
/**
|
|
* Returns the SubtleCrypto API for this environment if present.
|
|
*
|
|
* Right now (CosmJS 0.35), all supported environments we are aware of have
|
|
* SubtleCrypto. However, we keep the optional return type just in case as we can
|
|
* use the pure-JS fallback.
|
|
*/
|
|
export declare function getSubtle(): Promise<typeof crypto.subtle | undefined>;
|
|
export declare function pbkdf2Sha512Subtle(subtle: typeof crypto.subtle, secret: Uint8Array, salt: Uint8Array, iterations: number, keylen: number): Promise<Uint8Array>;
|
|
export declare function pbkdf2Sha512Noble(secret: Uint8Array, salt: Uint8Array, iterations: number, keylen: number): Promise<Uint8Array>;
|
|
/**
|
|
* A pbkdf2 implementation for BIP39. This is not exported at package level and thus a private API.
|
|
*/
|
|
export declare function pbkdf2Sha512(secret: Uint8Array, salt: Uint8Array, iterations: number, keylen: number): Promise<Uint8Array>;
|