lib/parsel/marshal.rb in parsel-0.2.0 vs lib/parsel/marshal.rb in parsel-0.3.0

- old
+ new

@@ -1,12 +1,14 @@ module Parsel module Marshal - def self.encrypt(key, data) - Parsel.encrypt(key, ::Marshal.dump(data)) + def self.encrypt(*args) + key, iv, data = Parsel.expand_args(args) + Parsel.encrypt(key, iv, ::Marshal.dump(data)) end - def self.decrypt(key, data) - ::Marshal.load Parsel.decrypt(key, data) + def self.decrypt(*args) + key, iv, data = Parsel.expand_args(args) + ::Marshal.load Parsel.decrypt(key, iv, data) rescue Exception false end end end