Function kcapi_sys::kcapi_cipher_init [−][src]
pub unsafe extern "C" fn kcapi_cipher_init(
handle: *mut *mut kcapi_handle,
ciphername: *const c_char,
flags: u32
) -> c_intExpand description
kcapi_cipher_init() - initialize cipher handle
@handle: [out] cipher handle filled during the call @ciphername: [in] kernel crypto API cipher name as specified in /proc/crypto @flags: [in] flags specifying the type of cipher handle
This function provides the initialization of a symmetric cipher handle and establishes the connection to the kernel.
On success, a pointer to kcapi_handle object is returned in *handle. Function kcapi_cipher_destroy() should be called afterwards to free resources.
@return 0 upon success; -ENOENT - algorithm not available; -EOPNOTSUPP - AF_ALG family not available; -EINVAL - accept syscall failed -ENOMEM - cipher handle cannot be allocated