Class: SolidusNexio::EncryptionService

Inherits:
Struct
  • Object
show all
Defined in:
app/services/solidus_nexio/encryption_service.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#saltObject

Returns the value of attribute salt

Returns:

  • (Object)

    the current value of salt



4
5
6
# File 'app/services/solidus_nexio/encryption_service.rb', line 4

def salt
  @salt
end

Class Method Details

.decrypt(salt, value) ⇒ Object



11
12
13
# File 'app/services/solidus_nexio/encryption_service.rb', line 11

def self.decrypt(salt, value)
  new(salt).decrypt_and_verify(value)
end

.encrypt(salt, value) ⇒ Object



7
8
9
# File 'app/services/solidus_nexio/encryption_service.rb', line 7

def self.encrypt(salt, value)
  new(salt).encrypt_and_sign(value)
end