summaryrefslogtreecommitdiffstats
path: root/openpgp/src/crypto/keygrip.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-06-28 13:59:48 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-06-28 13:59:48 +0200
commit1525eec1426a6a34b84809179d784e5cee3e8bfa (patch)
tree1e73534e95d14f776085df7ca6154057b8108712 /openpgp/src/crypto/keygrip.rs
parentf214d55b7061e9d6006f915ee8fbedf29ddf6078 (diff)
openpgp: Make struct MPI opaque.
Diffstat (limited to 'openpgp/src/crypto/keygrip.rs')
-rw-r--r--openpgp/src/crypto/keygrip.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/openpgp/src/crypto/keygrip.rs b/openpgp/src/crypto/keygrip.rs
index feccebc4..a9f3cd0a 100644
--- a/openpgp/src/crypto/keygrip.rs
+++ b/openpgp/src/crypto/keygrip.rs
@@ -57,9 +57,9 @@ impl PublicKey {
where H: Hash + ::std::io::Write
{
write!(hash, "(1:{}{}:",
- kind, mpi.value.len() + prefix.len()).unwrap();
+ kind, mpi.value().len() + prefix.len()).unwrap();
hash.update(prefix);
- hash.update(&mpi.value);
+ hash.update(mpi.value());
write!(hash, ")").unwrap();
}
@@ -75,11 +75,11 @@ impl PublicKey {
if i == 6 { q.clone() } else { ecc_param(curve, i) };
// Opaque encoding?
- if m.value[0] == 0x40 {
+ if m.value()[0] == 0x40 {
// Drop the prefix!
- let mut p = Vec::from(m.value);
+ let mut p = Vec::from(m.value());
p.remove(0);
- m.value = p.into();
+ m = p.into();
}
hash_sexp_mpi(hash, name, &[], &m);
@@ -99,7 +99,7 @@ impl PublicKey {
// overwhelming empirical evidence suggest that we
// need to prepend a 0.
hash.update(&[0]);
- hash.update(&n.value);
+ hash.update(n.value());
},
&DSA { ref p, ref q, ref g, ref y } => {