We want to encrypt the input file on client side using javascript in our aura component.
We are trying to use CryptoJS(https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js).
We have added this JS library as static resource and added in lightning component.
This library is working fine in Visualforce page. But in aura lightning component, we are getting error says "CryptoJS is not defined" when we call below method.
CryptoJS.AES.encrypt('123', '1234567887654321');
Same method is working fine in the VF page. Any idea why?