summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-12-03 13:58:24 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-12-03 13:58:24 +0100
commitbd153237fc6eb0a841f4d8b8d79f3383b7115b00 (patch)
tree07b7e8ad7b12d68da2b86729b68a219cff3cf6e0 /openpgp/src/parse
parent88442e46a8f5639c4493713baeb5b90f7cf6a84b (diff)
openpgp: Rename openpgp::conversions to openpgp::fmt.
Diffstat (limited to 'openpgp/src/parse')
-rw-r--r--openpgp/src/parse/hashed_reader.rs6
-rw-r--r--openpgp/src/parse/parse.rs16
2 files changed, 11 insertions, 11 deletions
diff --git a/openpgp/src/parse/hashed_reader.rs b/openpgp/src/parse/hashed_reader.rs
index 120cf222..a8ec36cf 100644
--- a/openpgp/src/parse/hashed_reader.rs
+++ b/openpgp/src/parse/hashed_reader.rs
@@ -88,7 +88,7 @@ impl Cookie {
if self.hashing == Hashing::Disabled {
t!(" hash_update: NOT hashing {} bytes: {}.",
- data.len(), crate::conversions::to_hex(data, true));
+ data.len(), crate::fmt::to_hex(data, true));
return;
}
@@ -96,7 +96,7 @@ impl Cookie {
for (i, sig_group) in self.sig_groups.iter_mut().enumerate() {
if topmost_group(i) && self.hashing != Hashing::Enabled {
t!("topmost group {} NOT hashing {} bytes: {}.",
- i, data.len(), crate::conversions::to_hex(data, true));
+ i, data.len(), crate::fmt::to_hex(data, true));
return;
}
@@ -280,7 +280,7 @@ mod test {
hash.digest(&mut digest);
assert_eq!(digest,
- &crate::conversions::from_hex(test.expected.get(algo)
+ &crate::fmt::from_hex(test.expected.get(algo)
.unwrap(), true)
.unwrap()[..],
"Algo: {:?}", algo);
diff --git a/openpgp/src/parse/parse.rs b/openpgp/src/parse/parse.rs
index a06a710c..79d09137 100644
--- a/openpgp/src/parse/parse.rs
+++ b/openpgp/src/parse/parse.rs
@@ -1385,10 +1385,10 @@ fn one_pass_sig_test () {
} else if let Packet::Signature(ref sig) = pp.packet {
eprintln!(" {}:\n prefix: expected: {}, in sig: {}",
test.filename,
- crate::conversions::to_hex(&test.hash_prefix[sigs][..], false),
- crate::conversions::to_hex(sig.hash_prefix(), false));
+ crate::fmt::to_hex(&test.hash_prefix[sigs][..], false),
+ crate::fmt::to_hex(sig.hash_prefix(), false));
eprintln!(" computed hash: {}",
- crate::conversions::to_hex(&sig.computed_hash().unwrap().1,
+ crate::fmt::to_hex(&sig.computed_hash().unwrap().1,
false));
assert_eq!(&test.hash_prefix[sigs], sig.hash_prefix());
@@ -1987,7 +1987,7 @@ fn skesk_parser_test() {
match skesk.decrypt(&test.password) {
Ok((_sym_algo, key)) => {
- let key = crate::conversions::to_hex(&key[..], false);
+ let key = crate::fmt::to_hex(&key[..], false);
assert_eq!(&key[..], &test.key_hex[..]);
}
Err(e) => {
@@ -3574,7 +3574,7 @@ impl<'a> PacketParser<'a> {
return Err(Error::InvalidSessionKey(
format!(
"Last two 16-bit quantities don't match: {}",
- crate::conversions::to_hex(&header[..], false)))
+ crate::fmt::to_hex(&header[..], false)))
.into());
}
}
@@ -3903,7 +3903,7 @@ mod test {
ppr, false, &[ Tag::SEIP, Tag::AED ][..],
&[ Tag::SKESK, Tag::PKESK ][..] );
if let PacketParserResult::Some(ref mut pp) = ppr {
- let key = crate::conversions::from_hex(test.key_hex, false)
+ let key = crate::fmt::from_hex(test.key_hex, false)
.unwrap().into();
pp.decrypt(test.algo, &key).unwrap();
@@ -3972,7 +3972,7 @@ mod test {
match pp.packet {
Packet::SEIP(_) | Packet::AED(_) => {
- let key = crate::conversions::from_hex(test.key_hex, false)
+ let key = crate::fmt::from_hex(test.key_hex, false)
.unwrap().into();
pp.decrypt(test.algo, &key).unwrap();
},
@@ -4109,7 +4109,7 @@ mod test {
match pp.packet {
Packet::SEIP(_) | Packet::AED(_) => {
- let key = crate::conversions::from_hex(test.key_hex, false)
+ let key = crate::fmt::from_hex(test.key_hex, false)
.unwrap().into();
pp.decrypt(test.algo, &key).unwrap();