summaryrefslogtreecommitdiffstats
path: root/vendor/md-5/src/lib.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/md-5/src/lib.rs
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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>;