Questions tagged [canonicalization]

is a process for converting data that has more than one possible representation into a "standard", "normal", or canonical form.

As per Wikipedia:

In computer science, canonicalization (abbreviated c14n, where 14 represents the number of letters between the C and the N; also sometimes standardization or normalization) is a process for converting data that has more than one possible representation into a "standard", "normal", or canonical form. This can be done to compare different representations for equivalence, to count the number of distinct data structures, to improve the efficiency of various algorithms by eliminating repeated calculations, or to make it possible to impose a meaningful sorting order.

197 questions
3
votes
1 answer

The canonical link points to the site root error

I have a website that uses country-specific pages. So for every page, there is a country-specific URL. For example: example.com/au/blog, example.com/us/blog, example.com/uk/blog. This is great as we can show content more relevant to each…
Charklewis
  • 4,427
  • 4
  • 31
  • 69
3
votes
2 answers

Using a HashSet to canonicalize objects in Rust

As an educational exercise, I'm looking at porting cvs-fast-export to Rust. Its basic mode of operation is to parse a number of CVS master files into a intermediate form, and then to analyse the intermediate form with the goal of transforming it…
Laurence
  • 10,896
  • 1
  • 25
  • 34
3
votes
1 answer

Multiple URLs for the same WordPress page

I'm developing a site that offers services to different locations. However, the services and the landing page for all visitors will be the same. I would like to have multiple "paths" from the same domain that all lead to the same landing page. So…
Craig
  • 139
  • 3
  • 10
3
votes
1 answer

URL Canonocalization with w2 instead of www?

Recently while scrolling around the internet I've found a few websites that have w2 at the beginning of the URL instead of www. I'm not really sure of what the purpose of using this form of canonicalization may serve, other than just to be…
Joshua Strot
  • 2,343
  • 4
  • 26
  • 33
3
votes
1 answer

Finalizer testing in Go

TLDR: Is there any way to reasonably write test cases to test finalizer behaviors? I'm trying to implement a memory-sensitive canonicalizing map / cache in Go. Since there is no notion of "soft reference" (and because my object graph will always…
BadZen
  • 4,083
  • 2
  • 25
  • 48
3
votes
1 answer

Change canonicalization algorithm with WCF

I am trying to call a webservice using WCF with a certificate to sign the message. The server only supports the following canonicalization algorithm : 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments' By default, WCF uses…
Arco
  • 33
  • 2
3
votes
0 answers

XAdES-BES detached SignedProperties Reference wrong DigestValue (Java)

Hi i'm looking for an answer why my DigestValue in SignedProperties Reference is incorrect. I tried to digest element in every single way i found example or documentation. This is my signature file (i chaged cert details):
3
votes
1 answer

Why do we need a canonical format for the GUID?

One hard working day I noticed that GUIDs I've been generating with usual .NET's Guid.NewGuid() method had the same number 4 in the beginning of the third…
astef
  • 8,575
  • 4
  • 56
  • 95
3
votes
1 answer

LLVM indvars pass

I am using -indvars pass in LLVM. It says that is makes the loop counter start from 0 where it is possible. I used it for a simple loop, but its not making the loop count start from 0. Any idea why is it so? The loop is for(i=30;i<90;++i){ …
coder hacker
  • 4,819
  • 1
  • 25
  • 50
3
votes
1 answer

C# Calculate and verify SHA256 value for SEPA (XML) paymentfile

i am struggling with the same issue like Markus Dreyer: C# Calculate SHA256 value for SEPA (XML) paymentfile According to the DFÜ Agreement i have to calculate a sha256 hash value: The hash value is created using the entire contained document,…
Özkan
  • 33
  • 1
  • 4
2
votes
3 answers

How to canonicalize XML in javascript?

Is there a JavaScript library for XML canonicalization with support for Exclusive XML Canonicalization? If there is no library for that, how can I canonicalize XML in a Node.js library with minimal requirements (no Ruby or Java)?
Anatoliy
  • 29,485
  • 5
  • 46
  • 45
2
votes
2 answers

How to canonicalize WSDL files in Java?

I need to find differences in two WSDL files. I started by pretty-printing them like here, but I see there are same things (e.g. complexTypes) in the two files defined (for whatever stupid reason) in a different order. I want to canonicalize the…
maaartinus
  • 44,714
  • 32
  • 161
  • 320
2
votes
1 answer

XML Digital Signature with Inclusive Canonicalization

I am trying to implement a routine for XML Digital Signature, and I am able to correcty calculate the hash of the information to be signed. However, I am facing problems with the signature itself, since I do not manage to create the real string to…
2
votes
2 answers

Canonicalize URLs for static site with custom domain in GAE

I'm running a static site on GAE and using a custom domain (let's call it example.com) with SSL certificates enabled. I'd like to canonicalize URLs to https://www.example.com/. That means catching any requests to myproject.appspot.com, plain HTTP,…
2
votes
1 answer

Canonicalize alternative for CF9

I have an application running on CF2016. We recently added Canonicalize() and some other functions to prevent xss attacks. Most of the clients using this app are on CF2016 but couple of them are at CF9 (will be upgraded next year or so) Code fails…
CFML_Developer
  • 1,565
  • 7
  • 18
1 2
3
13 14