Lines Matching full:ffi

14 use std::ffi::CString;
21 use ffi::{EVP_CIPHER_block_size, EVP_CIPHER_iv_length, EVP_CIPHER_key_length};
26 pub unsafe fn EVP_CIPHER_iv_length(ptr: *const ffi::EVP_CIPHER) -> c_int {
31 pub unsafe fn EVP_CIPHER_block_size(ptr: *const ffi::EVP_CIPHER) -> c_int {
36 pub unsafe fn EVP_CIPHER_key_length(ptr: *const ffi::EVP_CIPHER) -> c_int {
46 type Inner = *mut ffi::EVP_CIPHER;
52 ffi::EVP_CIPHER_free(self.as_ptr());
58 type CType = ffi::EVP_CIPHER;
123 let ptr = ffi::EVP_get_cipherbyname(ffi::OBJ_nid2sn(nid.as_raw())); in from_nid()
146 let ptr = cvt_p(ffi::EVP_CIPHER_fetch( in fetch()
157 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_ecb() as *mut _) } in aes_128_ecb()
161 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_cbc() as *mut _) } in aes_128_cbc()
166 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_xts() as *mut _) } in aes_128_xts()
171 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_xts() as *mut _) } in aes_256_xts()
175 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_ctr() as *mut _) } in aes_128_ctr()
180 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_cfb1() as *mut _) } in aes_128_cfb1()
185 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_cfb128() as *mut _) } in aes_128_cfb128()
190 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_cfb8() as *mut _) } in aes_128_cfb8()
194 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_gcm() as *mut _) } in aes_128_gcm()
199 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_ccm() as *mut _) } in aes_128_ccm()
203 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_ofb() as *mut _) } in aes_128_ofb()
209 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_ocb() as *mut _) } in aes_128_ocb()
215 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_wrap() as *mut _) } in aes_128_wrap()
221 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_wrap_pad() as *mut _) } in aes_128_wrap_pad()
225 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_ecb() as *mut _) } in aes_192_ecb()
229 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_cbc() as *mut _) } in aes_192_cbc()
233 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_ctr() as *mut _) } in aes_192_ctr()
238 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_cfb1() as *mut _) } in aes_192_cfb1()
243 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_cfb128() as *mut _) } in aes_192_cfb128()
248 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_cfb8() as *mut _) } in aes_192_cfb8()
252 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_gcm() as *mut _) } in aes_192_gcm()
257 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_ccm() as *mut _) } in aes_192_ccm()
261 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_ofb() as *mut _) } in aes_192_ofb()
267 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_ocb() as *mut _) } in aes_192_ocb()
273 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_wrap() as *mut _) } in aes_192_wrap()
279 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_wrap_pad() as *mut _) } in aes_192_wrap_pad()
283 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_ecb() as *mut _) } in aes_256_ecb()
287 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_cbc() as *mut _) } in aes_256_cbc()
291 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_ctr() as *mut _) } in aes_256_ctr()
296 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_cfb1() as *mut _) } in aes_256_cfb1()
301 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_cfb128() as *mut _) } in aes_256_cfb128()
306 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_cfb8() as *mut _) } in aes_256_cfb8()
310 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_gcm() as *mut _) } in aes_256_gcm()
315 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_ccm() as *mut _) } in aes_256_ccm()
319 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_ofb() as *mut _) } in aes_256_ofb()
325 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_ocb() as *mut _) } in aes_256_ocb()
331 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_wrap() as *mut _) } in aes_256_wrap()
337 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_wrap_pad() as *mut _) } in aes_256_wrap_pad()
343 unsafe { CipherRef::from_ptr(ffi::EVP_bf_cbc() as *mut _) } in bf_cbc()
349 unsafe { CipherRef::from_ptr(ffi::EVP_bf_ecb() as *mut _) } in bf_ecb()
355 unsafe { CipherRef::from_ptr(ffi::EVP_bf_cfb64() as *mut _) } in bf_cfb64()
361 unsafe { CipherRef::from_ptr(ffi::EVP_bf_ofb() as *mut _) } in bf_ofb()
365 unsafe { CipherRef::from_ptr(ffi::EVP_des_cbc() as *mut _) } in des_cbc()
369 unsafe { CipherRef::from_ptr(ffi::EVP_des_ecb() as *mut _) } in des_ecb()
373 unsafe { CipherRef::from_ptr(ffi::EVP_des_ede3() as *mut _) } in des_ede3()
377 unsafe { CipherRef::from_ptr(ffi::EVP_des_ede3_ecb() as *mut _) } in des_ede3_ecb()
381 unsafe { CipherRef::from_ptr(ffi::EVP_des_ede3_cbc() as *mut _) } in des_ede3_cbc()
386 unsafe { CipherRef::from_ptr(ffi::EVP_des_ede3_cfb8() as *mut _) } in des_ede3_cfb8()
391 unsafe { CipherRef::from_ptr(ffi::EVP_des_ede3_cfb64() as *mut _) } in des_ede3_cfb64()
396 unsafe { CipherRef::from_ptr(ffi::EVP_des_ede3_ofb() as *mut _) } in des_ede3_ofb()
401 unsafe { CipherRef::from_ptr(ffi::EVP_rc4() as *mut _) } in rc4()
407 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_128_cfb128() as *mut _) } in camellia128_cfb128()
413 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_128_ecb() as *mut _) } in camellia128_ecb()
419 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_128_cbc() as *mut _) } in camellia128_cbc()
425 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_128_ofb() as *mut _) } in camellia128_ofb()
431 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_192_cfb128() as *mut _) } in camellia192_cfb128()
437 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_192_ecb() as *mut _) } in camellia192_ecb()
443 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_192_cbc() as *mut _) } in camellia192_cbc()
449 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_192_ofb() as *mut _) } in camellia192_ofb()
455 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_256_cfb128() as *mut _) } in camellia256_cfb128()
461 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_256_ecb() as *mut _) } in camellia256_ecb()
467 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_256_cbc() as *mut _) } in camellia256_cbc()
473 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_256_ofb() as *mut _) } in camellia256_ofb()
479 unsafe { CipherRef::from_ptr(ffi::EVP_cast5_cfb64() as *mut _) } in cast5_cfb64()
485 unsafe { CipherRef::from_ptr(ffi::EVP_cast5_ecb() as *mut _) } in cast5_ecb()
491 unsafe { CipherRef::from_ptr(ffi::EVP_cast5_cbc() as *mut _) } in cast5_cbc()
497 unsafe { CipherRef::from_ptr(ffi::EVP_cast5_ofb() as *mut _) } in cast5_ofb()
503 unsafe { CipherRef::from_ptr(ffi::EVP_idea_cfb64() as *mut _) } in idea_cfb64()
509 unsafe { CipherRef::from_ptr(ffi::EVP_idea_ecb() as *mut _) } in idea_ecb()
515 unsafe { CipherRef::from_ptr(ffi::EVP_idea_cbc() as *mut _) } in idea_cbc()
521 unsafe { CipherRef::from_ptr(ffi::EVP_idea_ofb() as *mut _) } in idea_ofb()
526 unsafe { CipherRef::from_ptr(ffi::EVP_chacha20() as *mut _) } in chacha20()
531 unsafe { CipherRef::from_ptr(ffi::EVP_chacha20_poly1305() as *mut _) } in chacha20_poly1305()
537 unsafe { CipherRef::from_ptr(ffi::EVP_seed_cbc() as *mut _) } in seed_cbc()
543 unsafe { CipherRef::from_ptr(ffi::EVP_seed_cfb128() as *mut _) } in seed_cfb128()
549 unsafe { CipherRef::from_ptr(ffi::EVP_seed_ecb() as *mut _) } in seed_ecb()
555 unsafe { CipherRef::from_ptr(ffi::EVP_seed_ofb() as *mut _) } in seed_ofb()
560 unsafe { CipherRef::from_ptr(ffi::EVP_sm4_ecb() as *mut _) } in sm4_ecb()
565 unsafe { CipherRef::from_ptr(ffi::EVP_sm4_cbc() as *mut _) } in sm4_cbc()
570 unsafe { CipherRef::from_ptr(ffi::EVP_sm4_ctr() as *mut _) } in sm4_ctr()
575 unsafe { CipherRef::from_ptr(ffi::EVP_sm4_cfb128() as *mut _) } in sm4_cfb128()
580 unsafe { CipherRef::from_ptr(ffi::EVP_sm4_ofb() as *mut _) } in sm4_ofb()
588 type CType = ffi::EVP_CIPHER;
598 let nid = unsafe { ffi::EVP_CIPHER_nid(self.as_ptr()) }; in nid()