I’m using Ruby’s standard OpenSSL library. It has a method called random_iv that generates an IV with the proper length in ASCII-8BIT (binary) encoding. However, my Rails app and database is configured for UTF-8. I can’t convert that to UTF-8 to store it (because it’s binary, not ASCII text). So, how do I go about it? Do I have to do base64 conversion? Use SecureRandom?
I’m using Ruby’s standard OpenSSL library. It has a method called random_iv that generates
Share
Why not store the data in a
:binaryor:blobcolumn? These are designed to store arbitrary binary data.