pub trait IsEncrypt: Direction {
// Required methods
unsafe fn do_update(
ctx: *mut EVP_CIPHER_CTX,
input: &[u8],
output: &mut [u8],
) -> Result<usize, ErrorStack>;
unsafe fn do_finalize(
ctx: *mut EVP_CIPHER_CTX,
output: &mut [u8],
) -> Result<usize, ErrorStack>;
}Expand description
Helper trait that routes to the correct EVP_Encrypt* or EVP_Decrypt* functions.
Sealed: only Encrypt and Decrypt implement this.
Required Methods§
Sourceunsafe fn do_update(
ctx: *mut EVP_CIPHER_CTX,
input: &[u8],
output: &mut [u8],
) -> Result<usize, ErrorStack>
unsafe fn do_update( ctx: *mut EVP_CIPHER_CTX, input: &[u8], output: &mut [u8], ) -> Result<usize, ErrorStack>
Sourceunsafe fn do_finalize(
ctx: *mut EVP_CIPHER_CTX,
output: &mut [u8],
) -> Result<usize, ErrorStack>
unsafe fn do_finalize( ctx: *mut EVP_CIPHER_CTX, output: &mut [u8], ) -> Result<usize, ErrorStack>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.