I have implemented the crypto-Js in my application for local storage encryption and decryption. It works fine.
Problem: : While refreshing, the page goes black and the console throws the error below:
TypeError: Cannot read properties of undefined (reading 'words')
at Object._doReset (aes.js:103:1)
at Object.reset (cipher-core.js:119:1)
at Object.reset (cipher-core.js:461:1)
at Object.init (cipher-core.js:104:1)
at subtype.init (core.js:149:1)
at subtype.init (core.js:149:1)
at subtype.init (core.js:149:1)
at Object.create (core.js:176:1)
at Object.createDecryptor (cipher-core.js:81:1)
at Object.decrypt (cipher-core.js:728:1)
NOTE : If i clear the local storage and try agian it works.But whenever i refresh the page this error occures and page goes blank.
I would like to show you the encryption and decryption function that i have used as below:
Hi everyone!
I have implemented the crypto-Js in my application for local storage encryption and decryption. It works fine.
Problem: : While refreshing, the page goes black and the console throws the error below:
NOTE : If i clear the local storage and try agian it works.But whenever i refresh the page this error occures and page goes blank.
I would like to show you the encryption and decryption function that i have used as below: