forked from syndicate-lang/preserves
Tweak to canonicalization section.
This commit is contained in:
parent
5e89bfb2ca
commit
3556c98346
|
@ -169,7 +169,7 @@ out the elements in the same order, every time.
|
||||||
When combined with binary serialization, this is Preserves' "canonical
|
When combined with binary serialization, this is Preserves' "canonical
|
||||||
form".
|
form".
|
||||||
This is important and useful for many contexts, but especially for
|
This is important and useful for many contexts, but especially for
|
||||||
cryptographic signatures.
|
cryptographic signatures and hashing.
|
||||||
|
|
||||||
#+BEGIN_SRC preserves
|
#+BEGIN_SRC preserves
|
||||||
@"This hand-typed Preserves document..."
|
@"This hand-typed Preserves document..."
|
||||||
|
@ -185,8 +185,10 @@ cryptographic signatures.
|
||||||
"noise": "ooh-ooh"}}
|
"noise": "ooh-ooh"}}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
This is a bit more expensive than normal serialization (because
|
Clever implementations can get canonicalized output for free by
|
||||||
sorting needs to occur), but is still quite fast in general.
|
carefully ordering set elements and dictionary entries at construction
|
||||||
|
time, but even in simple implementations, canonical serialization is
|
||||||
|
almost as cheap as normal serialization.
|
||||||
|
|
||||||
** Defining our own types using Records
|
** Defining our own types using Records
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue