summaryrefslogtreecommitdiff
path: root/openssl/src/sha.rs
diff options
context:
space:
mode:
authorPeter Farr <Peter@PrismaPhonic.com>2019-11-11 11:09:49 -0800
committerPeter Farr <Peter@PrismaPhonic.com>2019-11-11 11:09:49 -0800
commit22f029064a31cb72c71fd43e8c17f75dfc3d9e03 (patch)
tree508e4a741c8d8208d3c0db940c01fe1b3de2c66d /openssl/src/sha.rs
parentdc72a8e2c429e46c275e528b61a733a66e7877fc (diff)
downloadrust-openssl-22f029064a31cb72c71fd43e8c17f75dfc3d9e03.zip
Added clonability for sha hash state. Useful for incremental hashing
Diffstat (limited to 'openssl/src/sha.rs')
-rw-r--r--openssl/src/sha.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/openssl/src/sha.rs b/openssl/src/sha.rs
index e3c4c2e8..dffadb90 100644
--- a/openssl/src/sha.rs
+++ b/openssl/src/sha.rs
@@ -110,6 +110,7 @@ pub fn sha512(data: &[u8]) -> [u8; 64] {
///
/// SHA1 is known to be insecure - it should not be used unless required for
/// compatibility with existing systems.
+#[derive(Clone)]
pub struct Sha1(ffi::SHA_CTX);
impl Sha1 {