class Xml::Kit::Signature
An implementation of the Signature
element. www.w3.org/TR/xmldsig-core1/#sec-Signature
@since 0.1.0
Constants
- DIGEST_METHODS
- SIGNATURE_METHODS
Attributes
certificate[R]
digest_method[R]
reference_id[R]
signature_method[R]
Public Class Methods
new(reference_id, signature_method: :SH256, digest_method: :SHA256, certificate:)
click to toggle source
# File lib/xml/kit/signature.rb, line 30 def initialize(reference_id, signature_method: :SH256, digest_method: :SHA256, certificate:) @certificate = certificate @digest_method = DIGEST_METHODS[digest_method] @reference_id = reference_id @signature_method = SIGNATURE_METHODS[signature_method] end
Public Instance Methods
to_xml(xml: ::Builder::XmlMarkup.new)
click to toggle source
# File lib/xml/kit/signature.rb, line 40 def to_xml(xml: ::Builder::XmlMarkup.new) ::Xml::Kit::Template.new(self).to_xml(xml: xml) end