mysql-aes
v0.1.0
Published
A Node.js implementation of MySQL aes_encrypt and aes_decrypt
Maintainers
Readme
mysql-aes
A Node.js implementation of MySQL
aes_encryptandaes_decrypt
Credits
https://github.com/mysqljs/mysql/issues/419#issuecomment-19873609
Install
$ npm i mysql-aes --saveAPI
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
License
the MIT License http://magicdawn.mit-license.org
