# @types/hmac-blake2b

> TypeScript definitions for hmac-blake2b

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

## Install

```sh
npm install @types/hmac-blake2b
pnpm add @types/hmac-blake2b
yarn add @types/hmac-blake2b
bun add @types/hmac-blake2b
```

## 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 | 2.0.2 |
| Published | 2023-11-07 |
| First published | 2022-08-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51432 |
| Maintainers | types |

## Links

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

## Recent versions

- 2.0.2 (latest) — 2023-11-07
- 2.0.0 (ts4.0) — 2022-08-28
- 2.0.1 — 2023-10-18

## README

# Installation
> `npm install --save @types/hmac-blake2b`

# Summary
This package contains type definitions for hmac-blake2b (https://github.com/emilbayes/hmac-blake2b).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hmac-blake2b.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hmac-blake2b/index.d.ts)
````ts
export = hmac;

/**
 * Computes a HMAC from `data` with `key` and writes it into `out`.
 *
 * @param out The buffer to write the result to. Must be of length `hmac.BYTES`.
 * @param data The data for which the HMAC should be generated.
 * @param key Per the HMAC spec `key` can be as small as 1 byte, in which case it is right-padded
 * with `NUL` bytes, or any size larger than `hmac.KEYBYTES` in which case it is hashed down to fit.
 * The recommended size by the spec is `hmac.KEYBYTES`
 *
 * @example
 * import { randombytes_buf } from 'sodium-native'
 * import hmac = require('hmac-blake2b')
 *
 * const mac = Buffer.alloc(hmac.BYTES)
 * const key = Buffer.alloc(hmac.KEYBYTES)
 * randombytes_buf(key)
 *
 * const data = Buffer.from('some data')
 *
 * hmac(mac, data, key)
 */
declare function hmac(out: Uint8Array, data: Uint8Array | readonly Uint8Array[], key: Uint8Array): void;

declare namespace hmac {
    /** Size of the output MAC in bytes */
    const BYTES: 64;
    /** [RFC2104](https://www.ietf.org/rfc/rfc2104.txt) recommended size of the key in bytes. */
    const KEYBYTES: 128;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: none

# Credits
These definitions were written by [BendingBender](https://github.com/BendingBender).

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