summaryrefslogtreecommitdiff
path: root/src/tag.rs
diff options
context:
space:
mode:
authorStuart Stock <stuart@int08h.com>2017-06-22 16:34:53 -0500
committerStuart Stock <stuart@int08h.com>2017-06-22 16:34:53 -0500
commit830e0b9782ba0181a94c436761585ba47b25b0d7 (patch)
treeaf9a229b1a8ff62d83342b4a6418bb365d38b03b /src/tag.rs
parentdc17df4885cef546ed44d14a291ba782b82d93ed (diff)
downloadroughenough-830e0b9782ba0181a94c436761585ba47b25b0d7.zip
simplistic semi-working server
Diffstat (limited to 'src/tag.rs')
-rw-r--r--src/tag.rs23
1 files changed, 5 insertions, 18 deletions
diff --git a/src/tag.rs b/src/tag.rs
index b50f5f5..4e3a8f1 100644
--- a/src/tag.rs
+++ b/src/tag.rs
@@ -4,26 +4,13 @@
pub enum Tag {
// Enforcement of the "tags in strictly increasing order" rule is done using the
// little-endian encoding of the ASCII tag value; e.g. 'SIG\x00' is 0x00474953 and
- // 'NONC' is 0x434e4f4e. The tags are listed here is reverse lexical order which
- // matches the little-endian comparison order.
- SREP,
- SIG,
- ROOT,
- RADI,
- PUBK,
- PATH,
- PAD,
- NONC,
- MINT,
- MIDP,
- MAXT,
- INDX,
- DELE,
- CERT,
+ // 'NONC' is 0x434e4f4e.
+
+ SIG, NONC, DELE, PATH, RADI, PUBK, MIDP, SREP, MINT, ROOT, CERT, MAXT, INDX, PAD
}
-static PAD_VALUE: [u8; 4] = [b'P', b'A', b'D', 0x00];
-static SIG_VALUE: [u8; 4] = [b'S', b'I', b'G', 0xff];
+static PAD_VALUE: [u8; 4] = [b'P', b'A', b'D', 0xff];
+static SIG_VALUE: [u8; 4] = [b'S', b'I', b'G', 0x00];
impl Tag {
/// Translates a tag into its on-the-wire representation