# easy-aes

> Easy AES-256 encryption and decryption

Latest version **1.2.2** (published 2022-01-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install easy-aes
pnpm add easy-aes
yarn add easy-aes
bun add easy-aes
```

## 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 | 1.2.2 |
| Published | 2022-01-27 |
| First published | 2022-01-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | rahulsai23 |
| Maintainers | rahulsai23 |
| Keywords | aes, encryption, decryption, encrypt, decrypt, aes-256, aes256 |

## Links

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

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 1.2.2 (latest) — 2022-01-27
- 1.2.1 — 2022-01-26
- 1.2.0 — 2022-01-25
- 1.1.1 — 2022-01-25

## README

# Easy-AES

## Description

- Easy Encryption and Decryption using AES-256 (Counter Mode)
- Any string of length 5 to 32 characters can be used as a key
- Keys are hashed using MD5 in order to meet the key-length requirement of AES-256
- Useful for verification tokens, and use cases where text has to be encrypted repeatedly

---

## Installation

`npm install easy-aes`

`yarn add easy-aes`

---

## Disclaimer

- Please do not use this package for encrypting passwords.
- Use `bcrypt` or some other hashing library for secure storage of passwords

---

## Usage

```js
import EasyAES from "easy-aes";
const aes = new EasyAES("secret-key");

const encrypted = aes.encrypt("plain-text");
const decrypted = aes.decrypt(encrypted);
```

```js
const EasyAES = require("easy-aes");
const aes = new EasyAES("secret-key");

const encrypted = aes.encrypt("plain-text");
const decrypted = aes.decrypt(encrypted);
```

---

## ES-Module Interop

- If you're using Typescript, and you face the following typeerror: `easy_aes_1.default is not a constructor`, please add the following to your compiler options in tsconfig.json: `"esModuleInterop": true`

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