Function gnunet_sys::GNUNET_IDENTITY_decrypt[][src]

pub unsafe extern "C" fn GNUNET_IDENTITY_decrypt(
    block: *const c_void,
    size: usize,
    priv_: *const GNUNET_IDENTITY_PrivateKey,
    ecc: *const GNUNET_CRYPTO_EcdhePublicKey,
    result: *mut c_void
) -> isize

Decrypt a given block with #GNUNET_IDENTITY_PrivateKey and a given #GNUNET_CRYPTO_EcdhePublicKey using ecdh to derive a symmetric key.

@param block the data to decrypt, encoded as returned by encrypt @param size the size of the @a block to decrypt @param priv private key to use for ecdh @param ecc the ecc public key @param result address to store the result at can be the same or overlap with @c block @return -1 on failure, size of decrypted block on success. Due to the use of CFB and therefore an effective stream cipher, this size should be the same as @c size.