In my .env file I have such environmental variable:
CRYPTO_KEY_SHORT=\x12\x34\x56\x78\x9A\x12\x32\xE3
I use this string as a key in code, like this:
const decryptedHash = cryptoService.decryptHex(confirmToken, `${process.env.CRYPTO_KEY_SHORT}`, null)
And here is the problem, it doesn't work this way, every time I get error - Error: Invalid key length, but if I hardcode this it work:
const decryptedHash = cryptoService.decryptHex(confirmToken, "\x12\x34\x56\x78\x9A\x12\x32\xE3", null)
So, after putting such variable to .env how can I use it?