diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-06-28 13:59:48 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-06-28 13:59:48 +0200 |
commit | 1525eec1426a6a34b84809179d784e5cee3e8bfa (patch) | |
tree | 1e73534e95d14f776085df7ca6154057b8108712 /openpgp/src/packet/pkesk.rs | |
parent | f214d55b7061e9d6006f915ee8fbedf29ddf6078 (diff) |
openpgp: Make struct MPI opaque.
Diffstat (limited to 'openpgp/src/packet/pkesk.rs')
-rw-r--r-- | openpgp/src/packet/pkesk.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/packet/pkesk.rs b/openpgp/src/packet/pkesk.rs index 1088d848..012c940e 100644 --- a/openpgp/src/packet/pkesk.rs +++ b/openpgp/src/packet/pkesk.rs @@ -82,9 +82,9 @@ impl PKESK3 { match recipient.mpis() { &mpis::PublicKey::RSA { ref e, ref n } => { // The ciphertext has the length of the modulus. - let mut esk = vec![0u8; n.value.len()]; + let mut esk = vec![0u8; n.value().len()]; - let pk = rsa::PublicKey::new(&n.value, &e.value)?; + let pk = rsa::PublicKey::new(n.value(), e.value())?; rsa::encrypt_pkcs1(&pk, &mut rng, &psk, &mut esk)?; Ciphertext::RSA {c: MPI::new(&esk)} } |