UNPKG

@hazae41/ripemd160

Version:

RIPEMD-160 adapter for WebAssembly and JS implementations

21 lines (18 loc) 608 B
import { Option, Nullable } from '@hazae41/option'; import { BytesOrCopiable, Copiable } from '../../libs/copiable/index.js'; declare function get(): Option<Adapter>; declare function set(value: Nullable<Adapter>): void; interface Hasher extends Disposable { cloneOrThrow(): Hasher; updateOrThrow(bytes: BytesOrCopiable): this; finalizeOrThrow(): Copiable; } interface HasherFactory { createOrThrow(): Hasher; } interface Adapter { readonly Hasher: HasherFactory; hashOrThrow(bytes: BytesOrCopiable): Copiable; } export { get, set }; export type { Adapter, Hasher, HasherFactory };