Closed flatsiedatsie closed 3 years ago
These files javascript/dist/aes256.js and javascript/dist/aes256.min.js does not require node.js
Thanks for the quick response. I managed to get it to work by adding crypto-js manually, and removing the require
code.
For anyone finding this, remove these two lines:
var CryptoJS = require('node-cryptojs-aes').CryptoJS;
and
module.exports = AES256;
and find the latest copy of crypto-js.min.js
and load that in your html before the aes256 part. E.g.
<script src="js/crypto-js.min.js"></script>
<script src="js/aes256.js"></script>
The documentation of the javascript version says "Works well both on the browsers". But the script actually doesn't run in the browser? It uses
require
, which assumed NodeJS?