class SecureArchive::Encryptor::Plain
Public Instance Methods
encrypt_file(source, destination)
click to toggle source
# File lib/secure_archive/encryptor/plain.rb, line 4 def encrypt_file(source, destination) destination.open('w') do |w| source.open do |r| buf = r.read(1024 * 16) while (buf) do w.write(buf) buf = r.read(1024 * 16) end end end end