Class: SAML2::Key::EncryptionMethod
- Inherits:
-
Object
- Object
- SAML2::Key::EncryptionMethod
- Defined in:
- lib/saml2/key.rb
Defined Under Namespace
Modules: Algorithm
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
Returns the value of attribute algorithm.
-
#key_size ⇒ Object
Returns the value of attribute key_size.
Instance Method Summary collapse
- #build(builder) ⇒ Object
-
#initialize(algorithm = Algorithm::AES128_CBC, key_size = 128) ⇒ EncryptionMethod
constructor
A new instance of EncryptionMethod.
Constructor Details
#initialize(algorithm = Algorithm::AES128_CBC, key_size = 128) ⇒ EncryptionMethod
Returns a new instance of EncryptionMethod.
17 18 19 |
# File 'lib/saml2/key.rb', line 17 def initialize(algorithm = Algorithm::AES128_CBC, key_size = 128) @algorithm, @key_size = algorithm, key_size end |
Instance Attribute Details
#algorithm ⇒ Object
Returns the value of attribute algorithm.
15 16 17 |
# File 'lib/saml2/key.rb', line 15 def algorithm @algorithm end |
#key_size ⇒ Object
Returns the value of attribute key_size.
15 16 17 |
# File 'lib/saml2/key.rb', line 15 def key_size @key_size end |
Instance Method Details
#build(builder) ⇒ Object
21 22 23 24 25 |
# File 'lib/saml2/key.rb', line 21 def build(builder) builder['md'].EncryptionMethod('Algorithm' => algorithm) do |encryption_method| encryption_method['xenc'].KeySize(key_size) if key_size end end |