Method: C3D::Encryptor#decrypt
- Defined in:
- lib/c3d/util/encrypt.rb
#decrypt(blob_file) ⇒ Object
decrypt will call gpg’s decrypt function on a blob. the function will only accept
a file path and does not accept raw file contents (roughly mirroring the verify
function). the function will return an array containing: [0] -- true or false flag
which signals whether the signature of the file was correct and verified by gpg as
well as [1] -- the path to the decrypted file.
83 84 85 86 87 88 89 90 91 |
# File 'lib/c3d/util/encrypt.rb', line 83 def decrypt blob_file clear_addendum outf = add_output_path_to_opts cmd = build_command '--decrypt', blob_file result = `#{cmd} 2>&1` result = parse_gpg_output result result = [outf, result] return result end |