源码地址: https://sourceforge.net/projects/srtp/
libsrtp主要是是用来加密rtp/rtcp的;
当然也可以加密任何文本,当然要注意前面的rtp_协议的字节是不加密的;
和AES加密没有什么过程区别;
编译很简单,Windows MinGW;
用法:
最好参考源码中的文档:libsrtp.pdf
示例,很简单,来自于上述文档;
1.7 Example Code
This section provides a simple example of how to use libSRTP. The example code lacks error checking, but is functional.
Here we assume that the value ssrc is already set to describe the SSRC of the stream that we are sending, and
that the functions get_rtp_packet() and send_srtp_packet() are available to us. The former puts an RTP packet into the
buffer and returns the number of octets written to that buffer. The latter sends the RTP packet in the buffer, given the
length as its