# @types/sha1

> TypeScript definitions for sha1

Latest version **1.1.5** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/sha1
pnpm add @types/sha1
yarn add @types/sha1
bun add @types/sha1
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.5 |
| Published | 2023-11-07 |
| First published | 2017-01-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51439 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/sha1
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sha1
- npm.io page: https://npm.io/package/@types/sha1

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 1.1.5 (latest) — 2023-11-07
- 1.1.3 (ts3.6) — 2021-07-06
- 1.1.2 (ts2.0) — 2019-05-22
- 1.1.4 — 2023-10-18
- 1.1.1 — 2017-10-25
- 1.1.0 — 2017-01-10

## README

# 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.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sha1/index.d.ts)
````ts
/// <reference types="node" />

/**
 * js function for hashing messages with SHA1
 *
 * @param message - a string or buffer to hash
 * @param options - an options object
 * @returns the resultant SHA1 hash of the given message
 */
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](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Bill Sourour](https://github.com/arcdev1).

---
_Source: https://npm.io/package/@types/sha1 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
