• Home
  • Raw
  • Download

Lines Matching refs:ffi

14 use std::ffi::CString;
20 use ffi::{EVP_CIPHER_block_size, EVP_CIPHER_iv_length, EVP_CIPHER_key_length};
25 pub unsafe fn EVP_CIPHER_iv_length(ptr: *const ffi::EVP_CIPHER) -> c_int {
30 pub unsafe fn EVP_CIPHER_block_size(ptr: *const ffi::EVP_CIPHER) -> c_int {
35 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;
107 let ptr = ffi::EVP_get_cipherbyname(ffi::OBJ_nid2sn(nid.as_raw())); in from_nid()
130 let ptr = cvt_p(ffi::EVP_CIPHER_fetch( in fetch()
141 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_ecb() as *mut _) } in aes_128_ecb()
145 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_cbc() as *mut _) } in aes_128_cbc()
150 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_xts() as *mut _) } in aes_128_xts()
155 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_ctr() as *mut _) } in aes_128_ctr()
160 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_cfb1() as *mut _) } in aes_128_cfb1()
165 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_cfb128() as *mut _) } in aes_128_cfb128()
170 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_cfb8() as *mut _) } in aes_128_cfb8()
175 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_gcm() as *mut _) } in aes_128_gcm()
180 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_ccm() as *mut _) } in aes_128_ccm()
185 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_ofb() as *mut _) } in aes_128_ofb()
191 unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_ocb() as *mut _) } in aes_128_ocb()
195 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_ecb() as *mut _) } in aes_192_ecb()
199 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_cbc() as *mut _) } in aes_192_cbc()
203 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_ctr() as *mut _) } in aes_192_ctr()
208 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_cfb1() as *mut _) } in aes_192_cfb1()
212 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_cfb128() as *mut _) } in aes_192_cfb128()
217 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_cfb8() as *mut _) } in aes_192_cfb8()
221 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_gcm() as *mut _) } in aes_192_gcm()
226 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_ccm() as *mut _) } in aes_192_ccm()
230 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_ofb() as *mut _) } in aes_192_ofb()
236 unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_ocb() as *mut _) } in aes_192_ocb()
240 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_ecb() as *mut _) } in aes_256_ecb()
244 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_cbc() as *mut _) } in aes_256_cbc()
248 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_ctr() as *mut _) } in aes_256_ctr()
253 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_cfb1() as *mut _) } in aes_256_cfb1()
257 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_cfb128() as *mut _) } in aes_256_cfb128()
262 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_cfb8() as *mut _) } in aes_256_cfb8()
266 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_gcm() as *mut _) } in aes_256_gcm()
271 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_ccm() as *mut _) } in aes_256_ccm()
275 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_ofb() as *mut _) } in aes_256_ofb()
281 unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_ocb() as *mut _) } in aes_256_ocb()
286 unsafe { CipherRef::from_ptr(ffi::EVP_bf_cbc() as *mut _) } in bf_cbc()
291 unsafe { CipherRef::from_ptr(ffi::EVP_bf_ecb() as *mut _) } in bf_ecb()
297 unsafe { CipherRef::from_ptr(ffi::EVP_bf_cfb64() as *mut _) } in bf_cfb64()
303 unsafe { CipherRef::from_ptr(ffi::EVP_bf_ofb() as *mut _) } in bf_ofb()
307 unsafe { CipherRef::from_ptr(ffi::EVP_des_cbc() as *mut _) } in des_cbc()
311 unsafe { CipherRef::from_ptr(ffi::EVP_des_ecb() as *mut _) } in des_ecb()
315 unsafe { CipherRef::from_ptr(ffi::EVP_des_ede3() as *mut _) } in des_ede3()
319 unsafe { CipherRef::from_ptr(ffi::EVP_des_ede3_cbc() as *mut _) } in des_ede3_cbc()
324 unsafe { CipherRef::from_ptr(ffi::EVP_des_ede3_cfb64() as *mut _) } in des_ede3_cfb64()
328 unsafe { CipherRef::from_ptr(ffi::EVP_rc4() as *mut _) } in rc4()
333 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_128_cfb128() as *mut _) } in camellia128_cfb128()
338 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_128_ecb() as *mut _) } in camellia128_ecb()
343 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_192_cfb128() as *mut _) } in camellia192_cfb128()
348 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_192_ecb() as *mut _) } in camellia192_ecb()
353 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_256_cfb128() as *mut _) } in camellia256_cfb128()
358 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_256_ecb() as *mut _) } in camellia256_ecb()
363 unsafe { CipherRef::from_ptr(ffi::EVP_cast5_cfb64() as *mut _) } in cast5_cfb64()
368 unsafe { CipherRef::from_ptr(ffi::EVP_cast5_ecb() as *mut _) } in cast5_ecb()
373 unsafe { CipherRef::from_ptr(ffi::EVP_idea_cfb64() as *mut _) } in idea_cfb64()
378 unsafe { CipherRef::from_ptr(ffi::EVP_idea_ecb() as *mut _) } in idea_ecb()
383 unsafe { CipherRef::from_ptr(ffi::EVP_chacha20() as *mut _) } in chacha20()
388 unsafe { CipherRef::from_ptr(ffi::EVP_chacha20_poly1305() as *mut _) } in chacha20_poly1305()
394 unsafe { CipherRef::from_ptr(ffi::EVP_seed_cbc() as *mut _) } in seed_cbc()
400 unsafe { CipherRef::from_ptr(ffi::EVP_seed_cfb128() as *mut _) } in seed_cfb128()
406 unsafe { CipherRef::from_ptr(ffi::EVP_seed_ecb() as *mut _) } in seed_ecb()
412 unsafe { CipherRef::from_ptr(ffi::EVP_seed_ofb() as *mut _) } in seed_ofb()
417 unsafe { CipherRef::from_ptr(ffi::EVP_sm4_ecb() as *mut _) } in sm4_ecb()
422 unsafe { CipherRef::from_ptr(ffi::EVP_sm4_cbc() as *mut _) } in sm4_cbc()
427 unsafe { CipherRef::from_ptr(ffi::EVP_sm4_ctr() as *mut _) } in sm4_ctr()
432 unsafe { CipherRef::from_ptr(ffi::EVP_sm4_cfb128() as *mut _) } in sm4_cfb128()
437 unsafe { CipherRef::from_ptr(ffi::EVP_sm4_ofb() as *mut _) } in sm4_ofb()
445 type CType = ffi::EVP_CIPHER;
455 let nid = unsafe { ffi::EVP_CIPHER_nid(self.as_ptr()) }; in nid()