lib/xml/kit/crypto.rb in xml-kit-0.1.11 vs lib/xml/kit/crypto.rb in xml-kit-0.1.12

- old
+ new

@@ -1,13 +1,15 @@ +# frozen_string_literal: true + require 'xml/kit/crypto/oaep_cipher' require 'xml/kit/crypto/rsa_cipher' require 'xml/kit/crypto/symmetric_cipher' require 'xml/kit/crypto/unknown_cipher' module Xml module Kit module Crypto - CIPHERS = [ SymmetricCipher, RsaCipher, OaepCipher, UnknownCipher ] + CIPHERS = [SymmetricCipher, RsaCipher, OaepCipher, UnknownCipher].freeze # @!visibility private def self.cipher_for(algorithm, key) CIPHERS.find { |x| x.matches?(algorithm) }.new(algorithm, key) end