Sha256: b294bc8127ce65534e705766f2e3c694e96f173e506e2684f2250bb853e064fc

Contents?: true

Size: 433 Bytes

Versions: 20

Compression:

Stored size: 433 Bytes

Contents

module Saml
  module Kit
    module Crypto
      class RsaCipher
        ALGORITHMS = {
          'http://www.w3.org/2001/04/xmlenc#rsa-1_5' => true,
        }

        def initialize(algorithm, key)
          @key = key
        end

        def self.matches?(algorithm)
          ALGORITHMS[algorithm]
        end

        def decrypt(cipher_text)
          @key.private_decrypt(cipher_text)
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
saml-kit-0.3.0 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.18 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.17 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.16 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.15 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.14 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.13 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.12 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.11 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.10 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.9 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.8 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.7 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.6 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.5 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.4 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.3 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.2 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.1 lib/saml/kit/crypto/rsa_cipher.rb
saml-kit-0.2.0 lib/saml/kit/crypto/rsa_cipher.rb