Thanks for making Amtraker! I was curious why this library was updated to depend on an external server? The site doesn't seem to explicitly block Node.js clients in my testing. (It does remove the `Access-Control-Allow-Origin: *` header from any `Origin` that isn't `https://amtrak.com`, but this was probably known.) I'm not sure if this is the reason, but the newest version of `crypto-js`, 4.2.0 (which, from `^4.1.1` with your `package.json`, will automatically be used), [the defaults for crypto.PBKDF2 have changed from SHA1 to SHA256](https://github.com/brix/crypto-js/commit/421dd538b2d34e7c24a5b72cc64dc2b9167db40a), breaking your code. You now need to directly specify the hashing algorithm like so: ```ts import crypto from "crypto-js"; function decrypt(content: string, key: string) { return crypto.AES.decrypt( { ciphertext: crypto.enc.Base64.parse(content) }, crypto.PBKDF2(key, crypto.enc.Hex.parse(sValue), { keySize: 4, iterations: 1e3, hasher: crypto.algo.SHA1 // here }), { iv: crypto.enc.Hex.parse(iValue) } ).toString(crypto.enc.Utf8); } ```
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by cabalex and has received 1 comments.