Class: FuryDumper::Encrypter

Inherits:
Object
  • Object
show all
Defined in:
lib/fury_dumper/encrypter.rb

Constant Summary collapse

KEY =
"\xBE\nXx\xE2\xDB\x85\xBD\xE1j}qz?}\xB0j6\xA95\xBAy80\x95\xE6\xC1\x9D\x9F\x89\xA2t"

Class Method Summary collapse

Class Method Details

.decrypt(encrypted_data) ⇒ Object



12
13
14
15
# File 'lib/fury_dumper/encrypter.rb', line 12

def self.decrypt(encrypted_data)
  crypt = ActiveSupport::MessageEncryptor.new(KEY)
  crypt.decrypt_and_verify(encrypted_data)
end

.encrypt(msg) ⇒ Object



7
8
9
10
# File 'lib/fury_dumper/encrypter.rb', line 7

def self.encrypt(msg)
  crypt = ActiveSupport::MessageEncryptor.new(KEY)
  crypt.encrypt_and_sign(msg)
end