1#![no_std]
12#[cfg(not(any(target_arch = "x86_64", target_arch = "x86")))]
13compile_error!("crate can only be used on x86 and x86-64 architectures");
14
15#[cfg(target_os = "windows")]
16compile_error!("crate does not support Windows targets");
17
18#[link(name = "md5", kind = "static")]
19extern "C" {
20 fn md5_compress(state: &mut [u32; 4], block: &[u8; 64]);
21}
22
23#[inline]
25pub fn compress(state: &mut [u32; 4], blocks: &[[u8; 64]]) {
26 for block in blocks {
27 unsafe {
28 md5_compress(state, block);
29 }
30 }
31}