canonical-form

XML Canonicalization algorithm gives two difference results when called directly than when called as part of an xml digital signature?

有些话、适合烂在心里 提交于 2020-01-21 04:36:09
问题 I'm getting two different hashes of the same xml document when I directly canonicalize some xml than when I perform a digital signature on it which also performs the same canonicalization algoririth on the xml before hashing it? I worked out that the digital signature canonicalization includes the new line characters '\n' and spacing characters when canonicalizing and the direct algorithm does not. Including the new line characters + spaces is not in the canonicalization specification though?

Canonical form of += operator for classes

爷,独闯天下 提交于 2019-12-10 16:39:58
问题 I know that it's a good idea to make as much of the interface of a class non-member non-friend as possible, and I've just realised that for my 3D vector class, 'Vector3', I can move the +=, -= and so on operators out of the class, leaving just constructors and the copy assignment operator. The question is: what should this operator look like? I've seen canonical forms of plenty of other operators and have followed their advice, but I haven't seen canonical forms of these operators. I've given

Canonicalize NFL team names

戏子无情 提交于 2019-12-10 16:14:08
问题 This is actually a machine learning classification problem but I imagine there's a perfectly good quick-and-dirty way to do it. I want to map a string describing an NFL team, like "San Francisco" or "49ers" or "San Francisco 49ers" or "SF forty-niners", to a canonical name for the team. (There are 32 NFL teams so it really just means finding the nearest of 32 bins to put a given string in.) The incoming strings are not actually totally arbitrary (they're from structured data sources like this

Which is the proper XML exclusive canonicalization?

天大地大妈咪最大 提交于 2019-12-02 08:00:45
问题 I'm using xmlseclibs to try and sign a SOAP document, but it does not seem to canonicalize things in the same way depending on whether I'm signing or validating. I'll give you an example. This is the XML I am trying to sign: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" MajorVersion="1" MinorVersion="1"

Which is the proper XML exclusive canonicalization?

这一生的挚爱 提交于 2019-12-02 07:18:57
I'm using xmlseclibs to try and sign a SOAP document, but it does not seem to canonicalize things in the same way depending on whether I'm signing or validating. I'll give you an example. This is the XML I am trying to sign: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" MajorVersion="1" MinorVersion="1" IssueInstant="2010-02-04T15:27:43Z" ResponseID="pfxe85313e6-e688-299a-df06-30f55e24f65a"> <samlp:Status> <samlp

XML Canonicalization algorithm gives two difference results when called directly than when called as part of an xml digital signature?

落花浮王杯 提交于 2019-11-30 19:39:57
I'm getting two different hashes of the same xml document when I directly canonicalize some xml than when I perform a digital signature on it which also performs the same canonicalization algoririth on the xml before hashing it? I worked out that the digital signature canonicalization includes the new line characters '\n' and spacing characters when canonicalizing and the direct algorithm does not. Including the new line characters + spaces is not in the canonicalization specification though? I'm specifically looking at this version http://www.w3.org/TR/2001/REC-xml-c14n-20010315 Does anyone