symmetric-encryption
                                
                                
                                
                                    symmetric-encryption copied to clipboard
                            
                            
                            
                        [Q] Encrypting file at disk and passing it to http client
Please delete this issue if this is not the proper place to ask. Anyway; I've got temporary files on disk which I need to encrypt and pass on to http client (that reads IO/streams).
Not sure how to do this right,  Pass file and StringIO (as a target) to SymmetricEncryption::Writer.encrypt and then construct new StringIO object from the result?
To read an encrypted file as a stream into another method, such as a controller download method, or http client:
    SymmetricEncryption::Reader.open('temp_file.enc') do |io|
     # Pass the decrypted stream into another library or method
      other_library(io)
    end
Note: Not all io methods are implemented. The above works for Rails controller download actions/streams.