Skip to content

magicdawn/node-mysql-aes

Repository files navigation

mysql-aes

A Node.js implementation of MySQL aes_encrypt and aes_decrypt

Build Status Coverage Status npm version npm downloads npm license

Credits

mysqljs/mysql#419 (comment)

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

About

A Node.js implementation of MySQL `aes_encrypt` and `aes_decrypt`

Resources

License

Stars

Watchers

Forks

Packages

No packages published