https://github.com/eldoy/wcrypt
https://github.com/eldoy/wcrypt
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/eldoy/wcrypt
- Owner: eldoy
- Created: 2019-08-31T17:47:09.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-01-29T06:50:30.000Z (over 6 years ago)
- Last Synced: 2025-06-26T09:47:30.067Z (about 1 year ago)
- Language: JavaScript
- Size: 43 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wcrypt
Encrypt and decrypt strings with Node.js
### Install
`npm i wcrypt`
### Usage
```javascript
/* Default options shown */
const wcrypt = require('wcrypt')({
algorithm: 'aes-192-cbc',
password: 'password',
salt: 'salt',
length: 24
})
/* Encrypt a string */
const encrypted = await wcrypt.encrypt('clear text string')
// e1ec7507554a2ce8c5d13b01f803c64f3b95c08d8a9b61e964f78d7656bbecb9
/* Decrypt a string */
const decrypted = await wcrypt.decrypt(encrypted)
// clear text string
```
MIT licensed. Enjoy!