Method: CcipherFactory::AsymKeyCipher.att_encryptor

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

.att_encryptor(eng = :ecc) ⇒ Object



33
34
35
36
37
38
39
40
41
42
# File 'lib/ccipher_factory/asymkey_cipher/asymkey_cipher.rb', line 33

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