class SAML2::KeyDescriptor::EncryptionMethod
Attributes
algorithm[RW]
@see Algorithm
@return [String]
key_size[RW]
@return [Integer]
Public Class Methods
new(algorithm = Algorithm::AES128_CBC, key_size = 128)
click to toggle source
@param algorithm [String] @param key_size
[Integer]
Calls superclass method
SAML2::Base::new
# File lib/saml2/key.rb, line 115 def initialize(algorithm = Algorithm::AES128_CBC, key_size = 128) super() @algorithm = algorithm @key_size = key_size end
Public Instance Methods
build(builder)
click to toggle source
(see Base#build
)
# 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
from_xml(node)
click to toggle source
(see Base#from_xml
)
# 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