libavformat/rtmpdh.h File Reference

#include "avformat.h"
#include "config.h"

Go to the source code of this file.

Functions

FF_DH * ff_dh_init (int key_len)
 Initialize a Diffie-Hellmann context.
void ff_dh_free (FF_DH *dh)
 Free a Diffie-Hellmann context.
int ff_dh_generate_public_key (FF_DH *dh)
 Generate a public key.
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_compute_shared_secret_key (FF_DH *dh, const uint8_t *pub_key, int pub_key_len, uint8_t *secret_key)
 Compute the shared secret key from the private FF_DH value and the other party's public value.


Function Documentation

int ff_dh_compute_shared_secret_key ( FF_DH *  dh,
const uint8_t pub_key,
int  pub_key_len,
uint8_t secret_key 
)

Compute the shared secret key from the private FF_DH value and the other party's public value.

Parameters:
dh a Diffie-Hellmann context, containing the private key
pub_key the buffer containing the public key
pub_key_len the length of the buffer
secret_key the buffer where the secret key is written
Returns:
length of the shared secret key on success, negative value otherwise

Definition at line 306 of file rtmpdh.c.

Referenced by ff_rtmpe_compute_secret_key().

void ff_dh_free ( FF_DH *  dh  ) 

Free a Diffie-Hellmann context.

Parameters:
dh a Diffie-Hellmann context to free

Referenced by ff_dh_init(), and rtmpe_close().

int ff_dh_generate_public_key ( FF_DH *  dh  ) 

Generate a public key.

Parameters:
dh a Diffie-Hellmann context
Returns:
zero on success, negative value otherwise

Definition at line 264 of file rtmpdh.c.

Referenced by ff_rtmpe_gen_pub_key().

FF_DH* ff_dh_init ( int  key_len  ) 

Initialize a Diffie-Hellmann context.

Parameters:
key_len length of the key
Returns:
a new Diffie-Hellmann context on success, NULL otherwise

Definition at line 237 of file rtmpdh.c.

Referenced by ff_rtmpe_gen_pub_key().

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.

Parameters:
dh a Diffie-Hellmann context, containing the public key to write
pub_key the buffer where the public key is written
pub_key_len the length of the buffer
Returns:
zero on success, negative value otherwise

Definition at line 290 of file rtmpdh.c.

Referenced by ff_rtmpe_gen_pub_key().


Generated on Fri Oct 26 02:50:11 2012 for FFmpeg by  doxygen 1.5.8