loftsteinn:crypto-aes

v0.1.0Published 10 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

AES algorithm from crypto.js (https://code.google.com/p/crypto-js/#AES)

Usage

CryptoJS is now available on both the client and server.

1encrypted = CryptoJS.AES.encrypt("Message", "Passphrase");
2console.log(encrypted.toString());
3// 53616c7465645f5fe5b50dc580ac44b9be85d240abc5ff8b66ca327950f4ade5
4
5decrypted = CryptoJS.AES.decrypt(encrypted, "Passphrase");
6console.log(decrypted.toString(CryptoJS.enc.Utf8));
7// Message