summaryrefslogtreecommitdiffstats
path: root/vendor/md-5/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/md-5/src/lib.rs')
-rw-r--r--vendor/md-5/src/lib.rs17
1 files changed, 12 insertions, 5 deletions
diff --git a/vendor/md-5/src/lib.rs b/vendor/md-5/src/lib.rs
index fadaf5192..87fe9134f 100644
--- a/vendor/md-5/src/lib.rs
+++ b/vendor/md-5/src/lib.rs
@@ -26,15 +26,14 @@
#![no_std]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
- html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
- html_root_url = "https://docs.rs/md-5/0.10.0"
+ html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg"
)]
#![warn(missing_docs, rust_2018_idioms)]
-#[cfg(feature = "asm")]
+#[cfg(all(feature = "asm", any(target_arch = "x86", target_arch = "x86_64")))]
extern crate md5_asm as compress;
-#[cfg(not(feature = "asm"))]
+#[cfg(not(all(feature = "asm", any(target_arch = "x86", target_arch = "x86_64"))))]
mod compress;
pub use digest::{self, Digest};
@@ -42,13 +41,15 @@ pub use digest::{self, Digest};
use compress::compress;
use core::{fmt, slice::from_ref};
+#[cfg(feature = "oid")]
+use digest::const_oid::{AssociatedOid, ObjectIdentifier};
use digest::{
block_buffer::Eager,
core_api::{
AlgorithmName, Block, BlockSizeUser, Buffer, BufferKindUser, CoreWrapper, FixedOutputCore,
OutputSizeUser, Reset, UpdateCore,
},
- generic_array::typenum::{Unsigned, U16, U64},
+ typenum::{Unsigned, U16, U64},
HashMarker, Output,
};
/// Core MD5 hasher state.
@@ -125,6 +126,12 @@ impl fmt::Debug for Md5Core {
}
}
+#[cfg(feature = "oid")]
+#[cfg_attr(docsrs, doc(cfg(feature = "oid")))]
+impl AssociatedOid for Md5Core {
+ const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.840.113549.2.5");
+}
+
/// MD5 hasher state.
pub type Md5 = CoreWrapper<Md5Core>;