Class: Xml::Kit::Crypto::UnknownCipher

Inherits:
Object
  • Object
show all
Defined in:
lib/xml/kit/crypto/unknown_cipher.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(algorithm, key) ⇒ UnknownCipher

Returns a new instance of UnknownCipher.



9
10
11
12
# File 'lib/xml/kit/crypto/unknown_cipher.rb', line 9

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

Instance Attribute Details

#algorithmObject (readonly)

Returns the value of attribute algorithm.



7
8
9
# File 'lib/xml/kit/crypto/unknown_cipher.rb', line 7

def algorithm
  @algorithm
end

#keyObject (readonly)

Returns the value of attribute key.



7
8
9
# File 'lib/xml/kit/crypto/unknown_cipher.rb', line 7

def key
  @key
end

Class Method Details

.matches?(_algorithm) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/xml/kit/crypto/unknown_cipher.rb', line 14

def self.matches?(_algorithm)
  true
end

Instance Method Details

#decrypt(cipher_text) ⇒ Object



18
19
20
# File 'lib/xml/kit/crypto/unknown_cipher.rb', line 18

def decrypt(cipher_text)
  cipher_text
end