Loading openssl/src/symm.rs +7 −7 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ impl Cipher { } /// Requires OpenSSL 1.1.0 or newer. #[cfg(any(ossl110))] #[cfg(ossl110)] pub fn aes_128_ocb() -> Cipher { unsafe { Cipher(ffi::EVP_aes_128_ocb()) } } Loading Loading @@ -173,7 +173,7 @@ impl Cipher { } /// Requires OpenSSL 1.1.0 or newer. #[cfg(any(ossl110))] #[cfg(ossl110)] pub fn aes_192_ocb() -> Cipher { unsafe { Cipher(ffi::EVP_aes_192_ocb()) } } Loading Loading @@ -219,7 +219,7 @@ impl Cipher { } /// Requires OpenSSL 1.1.0 or newer. #[cfg(any(ossl110))] #[cfg(ossl110)] pub fn aes_256_ocb() -> Cipher { unsafe { Cipher(ffi::EVP_aes_256_ocb()) } } Loading Loading @@ -318,14 +318,14 @@ impl Cipher { } /// Determines whether the cipher is using OCB mode #[cfg(any(ossl110))] #[cfg(ossl110)] fn is_ocb(&self) -> bool { *self == Cipher::aes_128_ocb() || *self == Cipher::aes_192_ocb() || *self == Cipher::aes_256_ocb() } #[cfg(not(any(ossl110)))] #[cfg(not(ossl110))] const fn is_ocb(&self) -> bool { false } Loading Loading @@ -1425,7 +1425,7 @@ mod tests { } #[test] #[cfg(any(ossl110))] #[cfg(ossl110)] fn test_aes_128_ocb() { let key = "000102030405060708090a0b0c0d0e0f"; let aad = "0001020304050607"; Loading Loading @@ -1461,7 +1461,7 @@ mod tests { } #[test] #[cfg(any(ossl110))] #[cfg(ossl110)] fn test_aes_128_ocb_fail() { let key = "000102030405060708090a0b0c0d0e0f"; let aad = "0001020304050607"; Loading Loading
openssl/src/symm.rs +7 −7 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ impl Cipher { } /// Requires OpenSSL 1.1.0 or newer. #[cfg(any(ossl110))] #[cfg(ossl110)] pub fn aes_128_ocb() -> Cipher { unsafe { Cipher(ffi::EVP_aes_128_ocb()) } } Loading Loading @@ -173,7 +173,7 @@ impl Cipher { } /// Requires OpenSSL 1.1.0 or newer. #[cfg(any(ossl110))] #[cfg(ossl110)] pub fn aes_192_ocb() -> Cipher { unsafe { Cipher(ffi::EVP_aes_192_ocb()) } } Loading Loading @@ -219,7 +219,7 @@ impl Cipher { } /// Requires OpenSSL 1.1.0 or newer. #[cfg(any(ossl110))] #[cfg(ossl110)] pub fn aes_256_ocb() -> Cipher { unsafe { Cipher(ffi::EVP_aes_256_ocb()) } } Loading Loading @@ -318,14 +318,14 @@ impl Cipher { } /// Determines whether the cipher is using OCB mode #[cfg(any(ossl110))] #[cfg(ossl110)] fn is_ocb(&self) -> bool { *self == Cipher::aes_128_ocb() || *self == Cipher::aes_192_ocb() || *self == Cipher::aes_256_ocb() } #[cfg(not(any(ossl110)))] #[cfg(not(ossl110))] const fn is_ocb(&self) -> bool { false } Loading Loading @@ -1425,7 +1425,7 @@ mod tests { } #[test] #[cfg(any(ossl110))] #[cfg(ossl110)] fn test_aes_128_ocb() { let key = "000102030405060708090a0b0c0d0e0f"; let aad = "0001020304050607"; Loading Loading @@ -1461,7 +1461,7 @@ mod tests { } #[test] #[cfg(any(ossl110))] #[cfg(ossl110)] fn test_aes_128_ocb_fail() { let key = "000102030405060708090a0b0c0d0e0f"; let aad = "0001020304050607"; Loading