lib/diffcrypt/file.rb
# Save the encrypted contents back to disk
# @return [Boolean] True is file save was successful
Save the encrypted contents back to disk
Save the encrypted contents back to disk
def write(key, data, cipher: nil)
      cipher ||= self.cipher
      yaml = ::YAML.dump(data)
      contents = Encryptor.new(key, cipher: cipher).encrypt(yaml)
      ::File.write(@path, contents)
    end
def write ( key , data , cipher : nil ) cipher ||= self . cipher yaml = :: YAML . dump ( data ) contents = Encryptor . new ( key , cipher : cipher ) . encrypt ( yaml ) :: File . write ( @path , contents ) end
Save the encrypted contents back to disk
Save the encrypted contents back to disk
True is file save was successful
True is file save was successful
Boolean
key
data
cipher