Function SecKeyCopyKeyExchangeResult

Source
pub unsafe extern "C-unwind" fn SecKeyCopyKeyExchangeResult(
    private_key: &SecKey,
    algorithm: &SecKeyAlgorithm,
    public_key: &SecKey,
    parameters: &CFDictionary,
    error: *mut *mut CFError,
) -> Option<CFRetained<CFData>>
Available on crate features SecBase and SecKey only.
Expand description

Perform Diffie-Hellman style of key exchange operation, optionally with additional key-derivation steps.

Parameter algorithm: One of SecKeyAlgorithm constants suitable to perform this operation.

Parameter publicKey: Remote party’s public key.

Parameter parameters: Dictionary with parameters, see SecKeyKeyExchangeParameter constants. Used algorithm determines the set of required and optional parameters to be used.

Parameter error: Pointer to an error object on failure. See “Security Error Codes” (SecBase.h).

Returns: Result of key exchange operation as a CFDataRef, or NULL on failure.