# aes-cmac-dibeling

> AES-CMAC implementation in typescript

Latest version **2.0.0** (published 2022-07-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install aes-cmac-dibeling
pnpm add aes-cmac-dibeling
yarn add aes-cmac-dibeling
bun add aes-cmac-dibeling
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-07-13 |
| First published | 2022-07-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 33.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Krzysztof Rosinski |
| Maintainers | danielibel |
| Keywords | aes-cmac |

## Links

- npm: https://www.npmjs.com/package/aes-cmac-dibeling
- Repository: https://github.com/rosek86/aes-cmac
- Homepage: https://github.com/rosek86/aes-cmac/#readme
- Issues: https://github.com/rosek86/aes-cmac/issues
- npm.io page: https://npm.io/package/aes-cmac-dibeling

## Dependencies (1)

- [one-webcrypto](https://npm.io/package/one-webcrypto.md) ^1.0.3

## Recent versions

- 2.0.0 (latest) — 2022-07-13

## README

# AES-CMAC

AES CMAC implementation in typescript.

## Install

```
npm i aes-cmac
```

## Examples

### NodeJS (CommonJS)

```typescript
const { AesCmac } = require("aes-cmac");

(async () => {
  const key = Buffer.from("2b7e151628aed2a6abf7158809cf4f3c", "hex");
  const msg = Buffer.from("6bc1bee22e409f96e93d7e117393172a", "hex");

  const aesCmac = new AesCmac(key);
  const result = Buffer.from(await aesCmac.calculate(msg));

  console.log(result.toString("hex"));
})();
```

### NodeJS (ECMAScript modules)

```typescript
import { AesCmac } from "aes-cmac";

const key = Buffer.from("2b7e151628aed2a6abf7158809cf4f3c", "hex");
const msg = Buffer.from("6bc1bee22e409f96e93d7e117393172a", "hex");

const aesCmac = new AesCmac(key);
const result = Buffer.from(await aesCmac.calculate(msg));

console.log(result.toString("hex"));
```

## References

- https://github.com/allan-stewart/node-aes-cmac
- https://tools.ietf.org/html/rfc4493

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