module Nib::Crypt
Constants
- DEFAULT_KEY_NAME
- VERSION
Public Class Methods
applies?()
click to toggle source
# File lib/nib_crypt_plugin.rb, line 3 def self.applies? true end
Public Instance Methods
decrypt(input, output)
click to toggle source
# File lib/nib/crypt.rb, line 19 def decrypt(input, output) exec(script(input, output, 'd')) end
encrypt(input, output)
click to toggle source
# File lib/nib/crypt.rb, line 15 def encrypt(input, output) exec(script(input, output, 'e')) end
init()
click to toggle source
# File lib/nib/crypt.rb, line 11 def init Initializer.new.call end
script(input, output, direction)
click to toggle source
# File lib/nib/crypt.rb, line 23 def script(input, output, direction) <<-"SCRIPT" openssl enc \ -in #{input} \ -out #{output} \ -#{direction} \ -md md5 \ -aes256 \ -pass file:#{DEFAULT_KEY_NAME} SCRIPT end