]> git.proxmox.com Git - cargo.git/blobdiff - vendor/openssl/src/memcmp.rs
New upstream version 0.63.1
[cargo.git] / vendor / openssl / src / memcmp.rs
index 3b831e6f2aba3a72dd52f555bbccb21f8c9587af..91281b9af304b9be6dbddfcfe498ea3c969b65e5 100644 (file)
@@ -12,7 +12,7 @@
 //!
 //! # Examples
 //!
-//! To perform a constant-time comparision of two arrays of the same length but different
+//! To perform a constant-time comparison of two arrays of the same length but different
 //! values:
 //!
 //! ```
@@ -30,7 +30,7 @@
 //! assert!(!eq(&a, &c));
 //! ```
 use libc::size_t;
-use ffi;
+use openssl_macros::corresponds;
 
 /// Returns `true` iff `a` and `b` contain the same bytes.
 ///
@@ -44,7 +44,7 @@ use ffi;
 ///
 /// # Examples
 ///
-/// To perform a constant-time comparision of two arrays of the same length but different
+/// To perform a constant-time comparison of two arrays of the same length but different
 /// values:
 ///
 /// ```
@@ -61,6 +61,7 @@ use ffi;
 /// assert!(!eq(&a, &b));
 /// assert!(!eq(&a, &c));
 /// ```
+#[corresponds(CRYPTO_memcmp)]
 pub fn eq(a: &[u8], b: &[u8]) -> bool {
     assert!(a.len() == b.len());
     let ret = unsafe {