class SAML2::KeyDescriptor::EncryptionMethod
Attributes
@see Algorithm
@return [String]
@return [Integer]
Public Class Methods
Source
# File lib/saml2/key.rb, line 115 def initialize(algorithm = Algorithm::AES128_CBC, key_size = 128) super() @algorithm = algorithm @key_size = key_size end
@param algorithm [String] @param key_size
[Integer]
Calls superclass method
SAML2::Base::new
Public Instance Methods
Source
# File lib/saml2/key.rb, line 128 def build(builder) builder["md"].EncryptionMethod("Algorithm" => algorithm) do |encryption_method| encryption_method["xenc"].KeySize(key_size) if key_size end end
(see Base#build
)
Source
# File lib/saml2/key.rb, line 122 def from_xml(node) self.algorithm = node["Algorithm"] self.key_size = node.at_xpath("xenc:KeySize", Namespaces::ALL)&.content&.to_i end
(see Base#from_xml
)