Sha256: 9ec94761f330710293b1c25acde06459b9121938a843db64a3f1fc6ed6f3de34

Contents?: true

Size: 335 Bytes

Versions: 1

Compression:

Stored size: 335 Bytes

Contents

module Parsel
  module JSON
    def self.encrypt(*args)
      key, iv, data = Parsel.expand_args(args)
      Parsel.encrypt(key, iv, ::JSON.dump(data))
    end

    def self.decrypt(*args)
      key, iv, data = Parsel.expand_args(args)
      ::JSON.load Parsel.decrypt(key, iv, data)
    rescue Exception
      false
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
parsel-0.3.0 lib/parsel/json.rb