Loading openssl-sys/src/evp.rs +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ pub unsafe fn EVP_get_digestbynid(type_: c_int) -> *const EVP_MD { extern "C" { pub fn EVP_MD_size(md: *const EVP_MD) -> c_int; pub fn EVP_MD_type(md: *const EVP_MD) -> c_int; #[cfg(any(ossl110, libressl273))] pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> c_int; Loading openssl/src/hash.rs +5 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,11 @@ impl MessageDigest { pub fn size(&self) -> usize { unsafe { ffi::EVP_MD_size(self.0) as usize } } /// The name of the digest pub fn type_(&self) -> Nid { Nid::from_raw(unsafe { ffi::EVP_MD_type(self.0) }) } } unsafe impl Sync for MessageDigest {} Loading Loading
openssl-sys/src/evp.rs +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ pub unsafe fn EVP_get_digestbynid(type_: c_int) -> *const EVP_MD { extern "C" { pub fn EVP_MD_size(md: *const EVP_MD) -> c_int; pub fn EVP_MD_type(md: *const EVP_MD) -> c_int; #[cfg(any(ossl110, libressl273))] pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> c_int; Loading
openssl/src/hash.rs +5 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,11 @@ impl MessageDigest { pub fn size(&self) -> usize { unsafe { ffi::EVP_MD_size(self.0) as usize } } /// The name of the digest pub fn type_(&self) -> Nid { Nid::from_raw(unsafe { ffi::EVP_MD_type(self.0) }) } } unsafe impl Sync for MessageDigest {} Loading