Class: Xml::Kit::Encryption Deprecated
- Inherits:
-
EncryptedData
- Object
- EncryptedData
- Xml::Kit::Encryption
- Defined in:
- lib/xml/kit/encryption.rb
Overview
Deprecated.
Use EncryptedData class instead of this
Constant Summary collapse
- DEFAULT_SYMMETRIC =
Crypto::SymmetricCipher::DEFAULT_ALGORITHM
- DEFAULT_ASYMMETRIC =
Crypto::RsaCipher::ALGORITHM
Instance Attribute Summary collapse
-
#asymmetric_algorithm ⇒ Object
readonly
Returns the value of attribute asymmetric_algorithm.
-
#key_info ⇒ Object
readonly
Returns the value of attribute key_info.
-
#symmetric_algorithm ⇒ Object
readonly
Returns the value of attribute symmetric_algorithm.
-
#symmetric_cipher_value ⇒ Object
readonly
Returns the value of attribute symmetric_cipher_value.
Attributes inherited from EncryptedData
Instance Method Summary collapse
-
#initialize(raw_xml, public_key, symmetric_algorithm: DEFAULT_SYMMETRIC, asymmetric_algorithm: DEFAULT_ASYMMETRIC, key_info: nil) ⇒ Encryption
constructor
A new instance of Encryption.
- #template_path ⇒ Object
Methods inherited from EncryptedData
Constructor Details
#initialize(raw_xml, public_key, symmetric_algorithm: DEFAULT_SYMMETRIC, asymmetric_algorithm: DEFAULT_ASYMMETRIC, key_info: nil) ⇒ Encryption
Returns a new instance of Encryption.
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/xml/kit/encryption.rb', line 15 def initialize(raw_xml, public_key, symmetric_algorithm: DEFAULT_SYMMETRIC, asymmetric_algorithm: DEFAULT_ASYMMETRIC, key_info: nil) @symmetric_algorithm = symmetric_algorithm @asymmetric_algorithm = asymmetric_algorithm Xml::Kit.deprecate('Encryption', alternative: 'EncryptedData') super(raw_xml, symmetric_cipher: symmetric(symmetric_algorithm), asymmetric_cipher: asymmetric(asymmetric_algorithm, public_key), key_info: key_info ) end |
Instance Attribute Details
#asymmetric_algorithm ⇒ Object (readonly)
Returns the value of attribute asymmetric_algorithm.
10 11 12 |
# File 'lib/xml/kit/encryption.rb', line 10 def asymmetric_algorithm @asymmetric_algorithm end |
#key_info ⇒ Object (readonly)
Returns the value of attribute key_info.
13 14 15 |
# File 'lib/xml/kit/encryption.rb', line 13 def key_info @key_info end |
#symmetric_algorithm ⇒ Object (readonly)
Returns the value of attribute symmetric_algorithm.
11 12 13 |
# File 'lib/xml/kit/encryption.rb', line 11 def symmetric_algorithm @symmetric_algorithm end |
#symmetric_cipher_value ⇒ Object (readonly)
Returns the value of attribute symmetric_cipher_value.
12 13 14 |
# File 'lib/xml/kit/encryption.rb', line 12 def symmetric_cipher_value @symmetric_cipher_value end |
Instance Method Details
#template_path ⇒ Object
28 29 30 |
# File 'lib/xml/kit/encryption.rb', line 28 def template_path Template::TEMPLATES_DIR.join('encrypted_data.builder') end |