Class: Trocla::Encryptions::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/trocla/encryptions.rb

Direct Known Subclasses

None, Ssl

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, trocla) ⇒ Base

Returns a new instance of Base.



5
6
7
8
# File 'lib/trocla/encryptions.rb', line 5

def initialize(config, trocla)
  @trocla = trocla
  @config = config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



4
5
6
# File 'lib/trocla/encryptions.rb', line 4

def config
  @config
end

#troclaObject (readonly)

Returns the value of attribute trocla.



4
5
6
# File 'lib/trocla/encryptions.rb', line 4

def trocla
  @trocla
end

Instance Method Details

#decrypt(value) ⇒ Object

Raises:

  • (NoMethodError)


14
15
16
# File 'lib/trocla/encryptions.rb', line 14

def decrypt(value)
  raise NoMethodError.new("#{self.class.name} needs to implement 'decrypt()'")
end

#encrypt(value) ⇒ Object

Raises:

  • (NoMethodError)


10
11
12
# File 'lib/trocla/encryptions.rb', line 10

def encrypt(value)
  raise NoMethodError.new("#{self.class.name} needs to implement 'encrypt()'")
end