summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Matuszewski <xanewok@gmail.com>2020-06-29 15:14:31 +0000
committerIgor Matuszewski <igor@sequoia-pgp.org>2020-06-29 17:23:20 +0200
commitd088710d8a76903bb1934d26800add815d56da62 (patch)
tree453c075ebb6ecb771c8e26e9f894e26187c95761
parent4d3f6e87a03525d12d5a03415db60af096bddb44 (diff)
openpgp: Make Digest trait only pub(crate)
-rw-r--r--openpgp/src/crypto/backend/nettle/hash.rs2
-rw-r--r--openpgp/src/crypto/hash.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/crypto/backend/nettle/hash.rs b/openpgp/src/crypto/backend/nettle/hash.rs
index 12271762..b4600b14 100644
--- a/openpgp/src/crypto/backend/nettle/hash.rs
+++ b/openpgp/src/crypto/backend/nettle/hash.rs
@@ -42,7 +42,7 @@ impl HashAlgorithm {
/// [`HashAlgorithm::is_supported`].
///
/// [`HashAlgorithm::is_supported`]: #method.is_supported
- pub fn new_hasher(self) -> Result<Box<dyn Digest>> {
+ pub(crate) fn new_hasher(self) -> Result<Box<dyn Digest>> {
use nettle::hash::{Sha224, Sha256, Sha384, Sha512};
use nettle::hash::insecure_do_not_use::{
Sha1,
diff --git a/openpgp/src/crypto/hash.rs b/openpgp/src/crypto/hash.rs
index fce57572..4d6e1d96 100644
--- a/openpgp/src/crypto/hash.rs
+++ b/openpgp/src/crypto/hash.rs
@@ -23,7 +23,7 @@ use std::io::{self, Write};
const DUMP_HASHED_VALUES: Option<&str> = None;
/// Hasher capable of calculating a digest for the input byte stream.
-pub trait Digest: DynClone {
+pub(crate) trait Digest: DynClone {
/// Size of the digest in bytes
fn digest_size(&self) -> usize;