Sha256: 4443ffdaf6a26432c4c1493d2ceb67a5f3009c18e562fbf2e4e5f299886e8cb0
Contents?: true
Size: 1.23 KB
Versions: 3
Compression:
Stored size: 1.23 KB
Contents
module CcipherFactory module AsymKeyCipher include TR::CondUtils class ASKCipher; end class AsymKeyCipherError < StandardError; end 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 def self.decryptor(eng = :ecc) c = ASKCipher.new case eng when :ecc c.extend(ECCDecrypt) else raise AsymKeyCipherError, "Not supoprted decryptor engine '#{eng}'" end c end 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 def self.att_decryptor(eng = :ecc) c = ASKCipher.new case eng when :ecc c.extend(ECCAttDecrypt) else raise AsymKeyCipherError, "Not supoprted decryptor engine '#{eng}'" end c end end end require_relative 'ecc/ecc_encrypt' require_relative 'ecc/ecc_decrypt' require_relative 'ecc/ecc_att_encrypt' require_relative 'ecc/ecc_att_decrypt'
Version data entries
3 entries across 3 versions & 1 rubygems