Hey folks, I'm a bit confused by why this doesn't work - is the AES 256 implementation only designed to work with string keys? Switching the key out to be a string in the following code causes the test to pass:
TypeError: Cannot read properties of undefined (reading '0')
at _class.xorBlock (node_modules/crypto-es/lib/cipher-core.js:280:32)
at _class.call [as processBlock] (node_modules/crypto-es/lib/cipher-core.js:313:14)
at AESAlgo.processBlock [as _doProcessBlock] (node_modules/crypto-es/lib/cipher-core.js:463:16)
at AESAlgo._doProcessBlock [as _process] (node_modules/crypto-es/lib/core.js:530:14)
at AESAlgo._process [as _doFinalize] (node_modules/crypto-es/lib/cipher-core.js:478:35)
at AESAlgo._doFinalize [as finalize] (node_modules/crypto-es/lib/cipher-core.js:175:37)
at Function.finalize [as encrypt] (node_modules/crypto-es/lib/cipher-core.js:651:34)
at Object.encrypt (node_modules/crypto-es/lib/cipher-core.js:110:42)
AES 256 should accept a 256-bit (32-byte) key, so I imagine something else is going wrong here.
Hey folks, I'm a bit confused by why this doesn't work - is the AES 256 implementation only designed to work with string keys? Switching the key out to be a string in the following code causes the test to pass:
Relevant code:
Expected output: test pass
Actual output: (fails at encryption step)
AES 256 should accept a 256-bit (32-byte) key, so I imagine something else is going wrong here.