[−][src]Function devolutions_crypto::ffi::DeriveKey
#[no_mangle] pub unsafe extern "C" fn DeriveKey(
key: *const u8,
key_length: usize,
salt: *const u8,
salt_length: usize,
niterations: usize,
result: *mut u8,
result_length: usize
) -> i64
Derive a key to create a new one. Can be used with a password.
Arguments
- key - Pointer to the key to derive.
- key_length - Length of the key to derive.
- salt - Pointer to the buffer containing the salt. Can be null.
- salt_length - Length of the salt to use.
- result - Pointer to the buffer to write the new key to.
- result_length - Length of buffer to write the key to.
Returns
Returns 0 if the operation is successful. If there is an error, it will return the appropriate error code defined in DevoCryptoError.