1.1.5 • Published 1 year ago

@distributed/aes v1.1.5

Weekly downloads
17
License
MIT
Repository
github
Last release
1 year ago

Package to encrypt & decrypt strings using aes-256-gcm.

Install

With yarn:

yarn add @distributed/aes

With npm:

npm install @distributed/aes

Usage

Don't use this package to encrypt your passwords, use hashing algorithms like argon2 or bcrypt instead.

import { encrypt, decrypt } from '@distributed/aes';

const key = 'secureKey';

const encrypted = encrypt(key, 'foo'); // 4lxXNMY0dxjTLtP2i8KV3Fe770+yaEj3KnGUPdKKHn0pgXo=
const decrypted = decrypt(key, encrypted); // foo

Demo on the fly

# Encrypt
curl https://aes.distributed.sh/encrypt?key=secureKey&input=foo
# -> aWmlhjZpAn/vbhsN60zciuUMnNNyec8ow0mNNde/IbCgy0M=%

# Decrypt
curl -X https://aes.distributed.sh/decrypt?key=secureKey&input="aWmlhjZpAn/vbhsN60zciuUMnNNyec8ow0mNNde/IbCgy0M="
# -> foo

Development

  1. Install dependencies using yarn install or npm install
  2. Start development server using yarn watch
1.1.5

1 year ago

1.1.4

1 year ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.6

3 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.0

5 years ago