Class: Xml::Kit::Crypto::BlockRegistry
- Inherits:
-
Object
- Object
- Xml::Kit::Crypto::BlockRegistry
- Defined in:
- lib/xml/kit/crypto.rb
Instance Method Summary collapse
- #cipher_for(algorithm, key) ⇒ Object
-
#initialize(&factory) ⇒ BlockRegistry
constructor
A new instance of BlockRegistry.
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 |