pub struct crypto_alg_t { /* private fields */ }Implementations§
Source§impl crypto_alg_t
impl crypto_alg_t
pub fn new(alg: E_ENCRYPT_ALG, passwd: &[u8]) -> Result<Self, RESULT>
Sourcepub fn encrypt_aes128_sm4(
&self,
src: &[u8],
dst: &mut [u8],
) -> Result<usize, RESULT>
pub fn encrypt_aes128_sm4( &self, src: &[u8], dst: &mut [u8], ) -> Result<usize, RESULT>
AES 128加密
pub fn encrypt_aes_256( &self, src: &[u8], dst: &mut [u8], ) -> Result<usize, RESULT>
pub fn encrypt(&self, src: &[u8], dst: &mut [u8]) -> Result<usize, RESULT>
pub fn get_alg(&self) -> E_ENCRYPT_ALG
pub fn decrypt_aes128_sm4( &self, src: &[u8], dst: &mut [u8], ) -> Result<usize, RESULT>
pub fn decrypt_aes_256( &self, src: &[u8], dst: &mut [u8], ) -> Result<usize, RESULT>
pub fn decrypt(&self, src: &[u8], dst: &mut [u8]) -> Result<usize, RESULT>
Trait Implementations§
Source§impl Clone for crypto_alg_t
impl Clone for crypto_alg_t
Source§fn clone(&self) -> crypto_alg_t
fn clone(&self) -> crypto_alg_t
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for crypto_alg_t
impl RefUnwindSafe for crypto_alg_t
impl Send for crypto_alg_t
impl Sync for crypto_alg_t
impl Unpin for crypto_alg_t
impl UnwindSafe for crypto_alg_t
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more