Method: CcipherFactory::AsymKeyCipher.encryptor

Defined in:
lib/ccipher_factory/asymkey_cipher/asymkey_cipher.rb

.encryptor(eng = :ecc) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/ccipher_factory/asymkey_cipher/asymkey_cipher.rb', line 11

def self.encryptor(eng = :ecc)
  c = ASKCipher.new
  case eng
  when :ecc
    c.extend(ECCEncrypt)
  else
    raise AsymKeyCipherError, "Not supported encryptor engine '#{eng}'"
  end
  c
end