module EncryptDecrypt

Handles encryption and decryption of files

Public Instance Methods

decrypt(data) click to toggle source

Decrypt data

# File lib/encrypt_decrypt.rb, line 12
def decrypt(data)
  crypto = GPGME::Crypto.new
  return crypto.decrypt(data).to_s
end
encrypt_data(file_obj, recipient) click to toggle source

Encrypt file

# File lib/encrypt_decrypt.rb, line 6
def encrypt_data(file_obj, recipient)
  crypto = GPGME::Crypto.new
  return crypto.encrypt(file_obj, recipients: recipient, armor: true)
end