Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nextorigin/aescrypt
AES Salted Encryption helper for NodeJS
https://github.com/nextorigin/aescrypt
aes aes-256 aes-encryption decryption encryption nodejs oauth oauth2 security
Last synced: about 1 month ago
JSON representation
AES Salted Encryption helper for NodeJS
- Host: GitHub
- URL: https://github.com/nextorigin/aescrypt
- Owner: nextorigin
- Created: 2017-04-02T20:52:08.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-09T19:13:27.000Z (over 7 years ago)
- Last Synced: 2024-11-05T16:07:08.327Z (2 months ago)
- Topics: aes, aes-256, aes-encryption, decryption, encryption, nodejs, oauth, oauth2, security
- Language: CoffeeScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AESCrypt
[![Build Status][ci-master]][travis-ci]
[![Coverage Status][coverage-master]][coveralls]
[![Dependency Status][dependency]][david]
[![devDependency Status][dev-dependency]][david-dev]
[![Downloads][downloads]][npm]AES Salted Encryption helper
Partially inspired by [AESCrypt Ruby gem][aescrypt-ruby].
[![NPM][npm-stats]][npm]
## Installation
```sh
npm install --save aescrypt
```## Usage
### AESCrypt.encryptWithSalt(keytext, cleardata)
```coffee
AESCrypt = require "aescrypt"keytext = "toomanysecrets"
cleardata = "we have explosive"{encrypted, salt} = AESCrypt.encryptWithSalt keytext, cleardata
###
encrypted = "nm6Ky1J/L7oBmiCont3hBzMwIf7cThAakcokykg="
salt = "C/GzCUNDSjiotRNei17TfQ=="
###
```### AESCrypt.decryptWithSalt(keytext, salt, encrypted)
```coffee
AESCrypt = require "aescrypt"encrypted = "nm6Ky1J/L7oBmiCont3hBzMwIf7cThAakcokykg="
salt = "C/GzCUNDSjiotRNei17TfQ=="decrypted = AESCrypt.decryptWithSalt keytext, salt, encrypted
###
decrypted = "we have explosive"
###
```
## LicenseMIT
[aescrypt-ruby]: https://github.com/Gurpartap/aescrypt
[ci-master]: https://img.shields.io/travis/nextorigin/aescrypt/master.svg?style=flat-square
[travis-ci]: https://travis-ci.org/nextorigin/aescrypt
[coverage-master]: https://img.shields.io/coveralls/nextorigin/aescrypt/master.svg?style=flat-square
[coveralls]: https://coveralls.io/r/nextorigin/aescrypt
[dependency]: https://img.shields.io/david/nextorigin/aescrypt.svg?style=flat-square
[david]: https://david-dm.org/nextorigin/aescrypt
[dev-dependency]: https://img.shields.io/david/dev/nextorigin/aescrypt.svg?style=flat-square
[david-dev]: https://david-dm.org/nextorigin/aescrypt?type=dev
[downloads]: https://img.shields.io/npm/dm/aescrypt.svg?style=flat-square
[npm]: https://www.npmjs.org/package/aescrypt
[npm-stats]: https://nodei.co/npm/aescrypt.png?downloads=true&downloadRank=true&stars=true