summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Michaelis <kai@sequoia-pgp.org>2018-04-27 16:30:33 +0200
committerKai Michaelis <kai@sequoia-pgp.org>2018-04-27 16:30:33 +0200
commit66dd27e2f08e7d3546ae5b78c60c402e8f8ccf6b (patch)
treeb25864b721bbd890d94461f77f8ad5f8a7d64f95
parentb7f222e30dcca320788ac622304c543bb25ad8df (diff)
openpgp: Document PK and compression algo enums
-rw-r--r--openpgp/src/constants.rs39
1 files changed, 10 insertions, 29 deletions
diff --git a/openpgp/src/constants.rs b/openpgp/src/constants.rs
index ef4d8b09..4f23cecf 100644
--- a/openpgp/src/constants.rs
+++ b/openpgp/src/constants.rs
@@ -2,23 +2,11 @@ use std::fmt;
use quickcheck::{Arbitrary, Gen};
-/*
- * 9.1. Public-Key Algorithms
- *
- * ID Algorithm
- * -- ---------
- * 1 - RSA (Encrypt or Sign) [HAC]
- * 2 - RSA Encrypt-Only [HAC]
- * 3 - RSA Sign-Only [HAC]
- * 16 - Elgamal (Encrypt-Only) [ELGAMAL] [HAC]
- * 17 - DSA (Digital Signature Algorithm) [FIPS186] [HAC]
- * 18 - Reserved for Elliptic Curve
- * 19 - Reserved for ECDSA
- * 20 - Reserved (formerly Elgamal Encrypt or Sign)
- * 21 - Reserved for Diffie-Hellman (X9.42,
- * as defined for IETF-S/MIME)
- * 100 to 110 - Private/Experimental algorithm
- */
+/// The OpenPGP public key algorithms as defined in [Section 9.1 of RFC 4880].
+///
+/// [Section 9.1 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-9.1
+///
+/// The values correspond to the serialized format.
#[derive(Clone,Copy,PartialEq,Eq,Debug)]
pub enum PublicKeyAlgorithm {
RsaEncryptSign,
@@ -85,18 +73,11 @@ impl Arbitrary for PublicKeyAlgorithm {
}
}
-
-/*
- * 9.3. Compression Algorithms
- *
- * ID Algorithm
- * -- ---------
- * 0 - Uncompressed
- * 1 - ZIP [RFC1951]
- * 2 - ZLIB [RFC1950]
- * 3 - BZip2 [BZ2]
- * 100 to 110 - Private/Experimental algorithm
- */
+/// The OpenPGP compression algorithms as defined in [Section 9.3 of RFC 4880].
+///
+/// [Section 9.3 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-9.3
+///
+/// The values correspond to the serialized format.
#[derive(Clone,Copy,PartialEq,Eq,Debug)]
pub enum CompressionAlgorithm {
Uncompressed,