summaryrefslogtreecommitdiffstats
path: root/openpgp/src/crypto/backend
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2021-09-09 15:14:07 +0200
committerJustus Winter <justus@sequoia-pgp.org>2021-09-16 12:51:18 +0200
commit794d128c704934e828302a7f02df66c72fe7819e (patch)
treecfed3737b2b0d11c1fa1dae5c0123af84279f1b3 /openpgp/src/crypto/backend
parentf65f9caac78f4ab34770d13f8b45ef41d1ff707d (diff)
openpgp: Fix documentation.
Diffstat (limited to 'openpgp/src/crypto/backend')
-rw-r--r--openpgp/src/crypto/backend/cng/symmetric.rs10
-rw-r--r--openpgp/src/crypto/backend/nettle/symmetric.rs10
2 files changed, 12 insertions, 8 deletions
diff --git a/openpgp/src/crypto/backend/cng/symmetric.rs b/openpgp/src/crypto/backend/cng/symmetric.rs
index 28af8af1..27ee095f 100644
--- a/openpgp/src/crypto/backend/cng/symmetric.rs
+++ b/openpgp/src/crypto/backend/cng/symmetric.rs
@@ -134,8 +134,9 @@ impl SymmetricAlgorithm {
}
}
- /// Length of a key for this algorithm in bytes. Fails if the crypto
- /// backend does not support this algorithm.
+ /// Length of a key for this algorithm in bytes.
+ ///
+ /// Fails if the crypto backend does not support this algorithm.
pub fn key_size(self) -> Result<usize> {
Ok(match self {
SymmetricAlgorithm::TripleDES => 24,
@@ -146,8 +147,9 @@ impl SymmetricAlgorithm {
})
}
- /// Length of a block for this algorithm in bytes. Fails if the crypto
- /// backend does not support this algorithm.
+ /// Length of a block for this algorithm in bytes.
+ ///
+ /// Fails if the crypto backend does not support this algorithm.
pub fn block_size(self) -> Result<usize> {
Ok(match self {
SymmetricAlgorithm::TripleDES => 8,
diff --git a/openpgp/src/crypto/backend/nettle/symmetric.rs b/openpgp/src/crypto/backend/nettle/symmetric.rs
index 72acae58..b75eaa0d 100644
--- a/openpgp/src/crypto/backend/nettle/symmetric.rs
+++ b/openpgp/src/crypto/backend/nettle/symmetric.rs
@@ -108,8 +108,9 @@ impl SymmetricAlgorithm {
}
}
- /// Length of a key for this algorithm in bytes. Fails if Sequoia
- /// does not support this algorithm.
+ /// Length of a key for this algorithm in bytes.
+ ///
+ /// Fails if Sequoia does not support this algorithm.
pub fn key_size(self) -> Result<usize> {
match self {
SymmetricAlgorithm::TripleDES => Ok(cipher::Des3::KEY_SIZE),
@@ -127,8 +128,9 @@ impl SymmetricAlgorithm {
}
}
- /// Length of a block for this algorithm in bytes. Fails if
- /// Sequoia does not support this algorithm.
+ /// Length of a block for this algorithm in bytes.
+ ///
+ /// Fails if Sequoia does not support this algorithm.
pub fn block_size(self) -> Result<usize> {
match self {
SymmetricAlgorithm::TripleDES => Ok(cipher::Des3::BLOCK_SIZE),