lib/xml/kit/signature.rb in xml-kit-0.3.1 vs lib/xml/kit/signature.rb in xml-kit-0.4.0

- old
+ new

@@ -13,11 +13,11 @@ SHA256: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256', SHA384: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha384', SHA512: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha512', }.freeze DIGEST_METHODS = { - SHA1: 'http://www.w3.org/2000/09/xmldsig#SHA1', + SHA1: 'http://www.w3.org/2000/09/xmldsig#sha1', SHA224: 'http://www.w3.org/2001/04/xmldsig-more#sha224', SHA256: 'http://www.w3.org/2001/04/xmlenc#sha256', SHA384: 'http://www.w3.org/2001/04/xmldsig-more#sha384', SHA512: 'http://www.w3.org/2001/04/xmlenc#sha512', }.freeze @@ -25,15 +25,13 @@ attr_reader :certificate attr_reader :digest_method attr_reader :reference_id attr_reader :signature_method - def initialize( - reference_id, - signature_method: :SH256, - digest_method: :SHA256, - certificate: - ) + 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