RTMP protocol digest.
More...
#include <stdint.h>
#include "libavutil/error.h"
#include "libavutil/hmac.h"
#include "rtmp.h"
|
| int | ff_rtmp_calc_digest (const uint8_t *src, int len, int gap, const uint8_t *key, int keylen, uint8_t *dst) |
| | Calculate HMAC-SHA2 digest for RTMP handshake packets. More...
|
| |
| int | ff_rtmp_calc_digest_pos (const uint8_t *buf, int off, int mod_val, int add_val) |
| | Calculate digest position for RTMP handshake packets. More...
|
| |
§ ff_rtmp_calc_digest()
| int ff_rtmp_calc_digest |
( |
const uint8_t * |
src, |
|
|
int |
len, |
|
|
int |
gap, |
|
|
const uint8_t * |
key, |
|
|
int |
keylen, |
|
|
uint8_t * |
dst |
|
) |
| |
Calculate HMAC-SHA2 digest for RTMP handshake packets.
- Parameters
-
| src | input buffer |
| len | input buffer length (should be 1536) |
| gap | offset in buffer where 32 bytes should not be taken into account when calculating digest (since it will be used to store that digest) |
| key | digest key |
| keylen | digest key length |
| dst | buffer where calculated digest will be stored (32 bytes) |
§ ff_rtmp_calc_digest_pos()
| int ff_rtmp_calc_digest_pos |
( |
const uint8_t * |
buf, |
|
|
int |
off, |
|
|
int |
mod_val, |
|
|
int |
add_val |
|
) |
| |
Calculate digest position for RTMP handshake packets.
- Parameters
-
| buf | input buffer (should be 1536 bytes) |
| off | offset in buffer where to start calculating digest position |
| mod_val | value used for computing modulo |
| add_val | value added at the end (after computing modulo) |