22 #ifndef AVFORMAT_RTMPDH_H
23 #define AVFORMAT_RTMPDH_H
32 typedef mpz_ptr FFBigNum;
36 typedef gcry_mpi_t FFBigNum;
39 #include <openssl/bn.h>
40 #include <openssl/dh.h>
42 typedef BIGNUM *FFBigNum;
99 int pub_key_len,
uint8_t *secret_key,
int ff_dh_compute_shared_secret_key(FF_DH *dh, const uint8_t *pub_key, int pub_key_len, uint8_t *secret_key, int secret_key_len)
Compute the shared secret key from the private FF_DH value and the other party's public value...
void ff_dh_free(FF_DH *dh)
Free a Diffie-Hellmann context.
FF_DH * ff_dh_init(int key_len)
Initialize a Diffie-Hellmann context.
int ff_dh_write_public_key(FF_DH *dh, uint8_t *pub_key, int pub_key_len)
Write the public key into the given buffer.
int ff_dh_generate_public_key(FF_DH *dh)
Generate a public key.