mysql-aes

A Node.js implementation of MySQL aes_encrypt and aes_decrypt

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
mysql-aes
600.1.02 years ago8 years agoMinified + gzip package size for mysql-aes in KB

Readme

mysql-aes
A Node.js implementation of MySQL aes_encrypt and aes_decrypt

Build Status Coverage Status npm version npm downloads npm license

Credits

https://github.com/mysqljs/mysql/issues/419#issuecomment-19873609

Install

$ npm i mysql-aes --save

API

const AES = require('mysql-aes')

| return type | signature | equal in mysql | | ----------- | ----------------------------- | --------------------------------------------------------- | | String | AES.encrypt(str, key) | SELECT HEX(AES_ENCRYPT(str, key)) | | String | AES.decrypt(encrypted, key) | SELECT CAST(AES_DECRYPT(UNHEX(encrypted), key) as CHAR) |

Changelog

CHANGELOG.md

License

the MIT License http://magicdawn.mit-license.org