Lines 127-148
Link Here
|
127 |
unsafe { MessageDigest(ffi::EVP_sha512()) } |
127 |
unsafe { MessageDigest(ffi::EVP_sha512()) } |
128 |
} |
128 |
} |
129 |
|
129 |
|
130 |
#[cfg(ossl111)] |
130 |
#[cfg(any(ossl111, libressl380))] |
131 |
pub fn sha3_224() -> MessageDigest { |
131 |
pub fn sha3_224() -> MessageDigest { |
132 |
unsafe { MessageDigest(ffi::EVP_sha3_224()) } |
132 |
unsafe { MessageDigest(ffi::EVP_sha3_224()) } |
133 |
} |
133 |
} |
134 |
|
134 |
|
135 |
#[cfg(ossl111)] |
135 |
#[cfg(any(ossl111, libressl380))] |
136 |
pub fn sha3_256() -> MessageDigest { |
136 |
pub fn sha3_256() -> MessageDigest { |
137 |
unsafe { MessageDigest(ffi::EVP_sha3_256()) } |
137 |
unsafe { MessageDigest(ffi::EVP_sha3_256()) } |
138 |
} |
138 |
} |
139 |
|
139 |
|
140 |
#[cfg(ossl111)] |
140 |
#[cfg(any(ossl111, libressl380))] |
141 |
pub fn sha3_384() -> MessageDigest { |
141 |
pub fn sha3_384() -> MessageDigest { |
142 |
unsafe { MessageDigest(ffi::EVP_sha3_384()) } |
142 |
unsafe { MessageDigest(ffi::EVP_sha3_384()) } |
143 |
} |
143 |
} |
144 |
|
144 |
|
145 |
#[cfg(ossl111)] |
145 |
#[cfg(any(ossl111, libressl380))] |
146 |
pub fn sha3_512() -> MessageDigest { |
146 |
pub fn sha3_512() -> MessageDigest { |
147 |
unsafe { MessageDigest(ffi::EVP_sha3_512()) } |
147 |
unsafe { MessageDigest(ffi::EVP_sha3_512()) } |
148 |
} |
148 |
} |
Lines 624-630
Link Here
|
624 |
); |
624 |
); |
625 |
} |
625 |
} |
626 |
|
626 |
|
627 |
#[cfg(ossl111)] |
627 |
#[cfg(any(ossl111, libressl380))] |
628 |
#[test] |
628 |
#[test] |
629 |
fn test_sha3_224() { |
629 |
fn test_sha3_224() { |
630 |
let tests = [( |
630 |
let tests = [( |
Lines 644-650
Link Here
|
644 |
); |
644 |
); |
645 |
} |
645 |
} |
646 |
|
646 |
|
647 |
#[cfg(ossl111)] |
647 |
#[cfg(any(ossl111, libressl380))] |
648 |
#[test] |
648 |
#[test] |
649 |
fn test_sha3_256() { |
649 |
fn test_sha3_256() { |
650 |
let tests = [( |
650 |
let tests = [( |
Lines 664-670
Link Here
|
664 |
); |
664 |
); |
665 |
} |
665 |
} |
666 |
|
666 |
|
667 |
#[cfg(ossl111)] |
667 |
#[cfg(any(ossl111, libressl380))] |
668 |
#[test] |
668 |
#[test] |
669 |
fn test_sha3_384() { |
669 |
fn test_sha3_384() { |
670 |
let tests = [("416c6c20796f75722062617365206172652062656c6f6e6720746f207573", |
670 |
let tests = [("416c6c20796f75722062617365206172652062656c6f6e6720746f207573", |
Lines 684-690
Link Here
|
684 |
); |
684 |
); |
685 |
} |
685 |
} |
686 |
|
686 |
|
687 |
#[cfg(ossl111)] |
687 |
#[cfg(any(ossl111, libressl380))] |
688 |
#[test] |
688 |
#[test] |
689 |
fn test_sha3_512() { |
689 |
fn test_sha3_512() { |
690 |
let tests = [("416c6c20796f75722062617365206172652062656c6f6e6720746f207573", |
690 |
let tests = [("416c6c20796f75722062617365206172652062656c6f6e6720746f207573", |