Class: Xml::Kit::Crypto::BlockRegistry

Inherits:
Object
  • Object
show all
Defined in:
lib/xml/kit/crypto.rb

Instance Method Summary collapse

Constructor Details

#initialize(&factory) ⇒ BlockRegistry

Returns a new instance of BlockRegistry.



23
24
25
# File 'lib/xml/kit/crypto.rb', line 23

def initialize(&factory)
  @factory = factory
end

Instance Method Details

#cipher_for(algorithm, key) ⇒ Object



27
28
29
# File 'lib/xml/kit/crypto.rb', line 27

def cipher_for(algorithm, key)
  @factory.call(algorithm, key)
end