lavu: Add an API for calculating HMAC (RFC 2104)

This supports HMAC-MD5 and HMAC-SHA1 for now, other hashes are
simple to add.

Signed-off-by: Martin Storsjö <martin@martin.st>
lavf: Add functions for SRTP decryption/encryption

This supports the AES_CM_128_HMAC_SHA1_80 and
AES_CM_128_HMAC_SHA1_32 cipher suites (from RFC 4568) at the
moment. The main missing features are replay protection (which can be
added later without changing the internal API), and the F8 and null
ciphers.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtsp: Support decryption of SRTP signalled via RFC 4568 (SDES)

This only takes care of decrypting incoming packets; the outgoing
RTCP packets are not encrypted. This is enough for some use cases,
and signalling crypto keys for use with outgoing RTCP packets
doesn't fit as simply into the API. If the SDP demuxer is hooked
up with custom IO, the return packets can be encrypted e.g. via the
SRTP protocol.

If the SRTP keys aren't available within the SDP, the decryption
can be handled externally as well (when using custom IO).

Signed-off-by: Martin Storsjö <martin@martin.st>
lavf: Add a protocol for SRTP encryption/decryption

This is mostly useful for encryption together with the RTP muxer,
but could also be set up as IO towards the peer with the SDP
demuxer with custom IO.

Signed-off-by: Martin Storsjö <martin@martin.st>
sdp: Include SRTP crypto params if using the srtp protocol

Also print port numbers for this protocol.

Signed-off-by: Martin Storsjö <martin@martin.st>