diff options
-rw-r--r-- | openpgp/src/parse.rs | 2 | ||||
-rw-r--r-- | openpgp/src/types/mod.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/parse.rs b/openpgp/src/parse.rs index b1c0e410..8b6f5ee7 100644 --- a/openpgp/src/parse.rs +++ b/openpgp/src/parse.rs @@ -2638,7 +2638,7 @@ impl PKESK3 { let mut keyid = [0u8; 8]; keyid.copy_from_slice(&php_try!(php.parse_bytes("keyid", 8))); let pk_algo: PublicKeyAlgorithm = php_try!(php.parse_u8("pk_algo")).into(); - if ! pk_algo.can_encrypt() { + if ! pk_algo.for_encryption() { return php.fail("not an encryption algorithm"); } let mpis = crypto::mpis::Ciphertext::_parse(pk_algo, &mut php)?; diff --git a/openpgp/src/types/mod.rs b/openpgp/src/types/mod.rs index 0e7dff89..a2b38f65 100644 --- a/openpgp/src/types/mod.rs +++ b/openpgp/src/types/mod.rs @@ -92,7 +92,7 @@ impl PublicKeyAlgorithm { } /// Returns true if the algorithm can encrypt data. - pub fn can_encrypt(&self) -> bool { + pub fn for_encryption(&self) -> bool { use self::PublicKeyAlgorithm::*; #[allow(deprecated)] match &self { |