diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2023-03-23 17:46:26 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2023-03-24 10:08:31 +0100 |
commit | b0b716b8910c220703734313e11f0bf01aa2e315 (patch) | |
tree | 6b902cd15a4a0cad456c73da02d1d430b0687875 /openpgp/src/crypto/backend/openssl | |
parent | 301ad2858cf43b06f398214d87c8b5bf24dffa79 (diff) |
openpgp: Provide a common public SymmetricAlgorithm::is_supported.
Diffstat (limited to 'openpgp/src/crypto/backend/openssl')
-rw-r--r-- | openpgp/src/crypto/backend/openssl/symmetric.rs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/openpgp/src/crypto/backend/openssl/symmetric.rs b/openpgp/src/crypto/backend/openssl/symmetric.rs index aa2cff01..60522a32 100644 --- a/openpgp/src/crypto/backend/openssl/symmetric.rs +++ b/openpgp/src/crypto/backend/openssl/symmetric.rs @@ -60,23 +60,7 @@ impl Mode for OpenSslMode { impl SymmetricAlgorithm { /// Returns whether this algorithm is supported by the crypto backend. - /// - /// All backends support all the AES variants. - /// - /// # Examples - /// - /// ```rust - /// use sequoia_openpgp as openpgp; - /// use openpgp::types::SymmetricAlgorithm; - /// - /// assert!(SymmetricAlgorithm::AES256.is_supported()); - /// assert!(SymmetricAlgorithm::TripleDES.is_supported()); - /// - /// assert!(!SymmetricAlgorithm::Twofish.is_supported()); - /// assert!(!SymmetricAlgorithm::Unencrypted.is_supported()); - /// assert!(!SymmetricAlgorithm::Private(101).is_supported()); - /// ``` - pub fn is_supported(&self) -> bool { + pub(crate) fn is_supported_by_backend(&self) -> bool { let cipher: &CipherRef = if let Ok(cipher) = (*self).make_cfb_cipher() { cipher } else { |