Module: Parsel::Marshal

Defined in:
lib/parsel/marshal.rb

Class Method Summary collapse

Class Method Details

.decrypt(*args) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/parsel/marshal.rb', line 9

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

.encrypt(*args) ⇒ Object



3
4
5
6
7
# File 'lib/parsel/marshal.rb', line 3

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