Jul 10, 2017 · 1 min read
Hi,
It’s strange that so far nobody has reported here any problems with storing and reading bytes string in environment variables.
In article You used figaro I tested it and dotenv-rails too, unfortunately in both cases with the same result..
Solution:
# result saved in .env filesalt.unpack('H*').first
key.unpack('H*').first# read values from .env file[ENV['SALT']].pack('H*')
[ENV['KEY']].pack('H*')
Regards!