Sha256: bffeaf26fbf029c945bae699176d0504936c6ffcc15721693bfac82130becd61

Contents?: true

Size: 446 Bytes

Versions: 1

Compression:

Stored size: 446 Bytes

Contents

require 'xml/kit/crypto/oaep_cipher'
require 'xml/kit/crypto/rsa_cipher'
require 'xml/kit/crypto/simple_cipher'
require 'xml/kit/crypto/unknown_cipher'

module Xml
  module Kit
    module Crypto
      DECRYPTORS = [ SimpleCipher, RsaCipher, OaepCipher, UnknownCipher ]

      # @!visibility private
      def self.decryptor_for(algorithm, key)
        DECRYPTORS.find { |x| x.matches?(algorithm) }.new(algorithm, key)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xml-kit-0.1.0 lib/xml/kit/crypto.rb