ethers.js/packages/crypto/src.ts/index.ts

38 lines
764 B
TypeScript
Raw Permalink Normal View History

2022-04-11 17:09:17 -04:00
// We import all these so we can export lock()
import { computeHmac } from "./hmac.js";
import { keccak256 } from "./keccak.js";
import { ripemd160 } from "./ripemd160.js";
import { pbkdf2 } from "./pbkdf2.js";
import { randomBytes } from "./random.js";
import { scrypt, scryptSync } from "./scrypt.js";
import { sha256, sha512 } from "./sha2.js";
export {
computeHmac,
randomBytes,
keccak256,
ripemd160,
sha256, sha512,
pbkdf2,
scrypt, scryptSync
};
export function lock(): void {
computeHmac.lock();
keccak256.lock();
pbkdf2.lock();
randomBytes.lock();
ripemd160.lock();
scrypt.lock();
scryptSync.lock();
sha256.lock();
sha512.lock();
}
export type { ProgressCallback } from "./scrypt.js";