lib/cryptoform/encryption_backends/lockbox.rb in cryptoform-0.1.0 vs lib/cryptoform/encryption_backends/lockbox.rb in cryptoform-0.2.0

- old
+ new

@@ -1,9 +1,15 @@ # frozen_string_literal: true class Cryptoform::EncryptionBackends::Lockbox < Cryptoform::EncryptionBackends::Backend - def encrypt(json) = lockbox.encrypt(json.to_json) + def encrypt(json) + lockbox.encrypt(json.to_json) + end - def decrypt(ciphertext) = JSON.parse(lockbox.decrypt(ciphertext)) + def decrypt(ciphertext) + JSON.parse(lockbox.decrypt(ciphertext)) + end - def lockbox = ::Lockbox.new(key: @params[:key].call, encode: true) + def lockbox + ::Lockbox.new(key: @params[:key].call, encode: true) + end end