Installation
npm install --save @types/sha1
Summary
This package contains type definitions for sha1 (https://github.com/pvorb/node-sha1).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sha1.
declare function main(message: string | Buffer, options?: Sha1AsStringOptions): string;
declare function main(message: string | Buffer, options?: Sha1AsBytesOptions): Uint8Array;
declare function main(message: string | Buffer, options?: Sha1Options): string | Uint8Array;
export = main;
interface Sha1AsStringOptions {
asBytes?: false | undefined;
asString?: boolean | undefined;
}
interface Sha1AsBytesOptions {
asBytes: true;
asString?: false | undefined;
}
type Sha1Options = Sha1AsStringOptions | Sha1AsBytesOptions;
Additional Details
- Last updated: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: @types/node
Credits
These definitions were written by Bill Sourour.