Python wrapper around the libsrtp library
Project description
What is pylibsrtp?
pylibsrtp is a Python wrapper around libsrtp, making it possible to encrypt and decrypt Secure Real-time Transport Protocol (SRTP) packets from Python code.
SRTP is a profile of the Real-time Transport Protocol (RTP) which provides confidentiality, message authentication, and replay protection. It is defined by RFC 3711.
You can install pylibsrtp with pip:
$ pip install pylibsrtp
To learn more about pylibsrtp please read the documentation.
Example
#!/usr/bin/env python
from pylibsrtp import Policy, Session
key = (b'\x00' * 30)
rtp = b'\x80\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' + (b'\xd4' * 160)
# protect RTP
tx_policy = Policy(key=key, ssrc_type=Policy.SSRC_ANY_OUTBOUND)
tx_session = Session(policy=tx_policy)
srtp = tx_session.protect(rtp)
# unprotect RTP
rx_policy = Policy(key=key, ssrc_type=Policy.SSRC_ANY_INBOUND)
rx_session = Session(policy=rx_policy)
rtp2 = rx_session.unprotect(srtp)
# check roundtrip worked!
assert rtp2 == rtp
Building pylibsrtp
If you wish to build pylibsrtp yourself, you will need libsrtp version 2.0 or better.
On Debian/Ubuntu run:
$ apt install libsrtp2-dev
On OS X run:
$ brew install srtp
License
pylibsrtp is released under the BSD license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pylibsrtp-0.6.6.tar.gz
(10.3 kB
view hashes)
Built Distributions
Close
Hashes for pylibsrtp-0.6.6-pp36-pypy36_pp73-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d4d212d6c90bfc9976ffd74b66dee003273b6badb75a9f5cd502c23f9b58ee6 |
|
MD5 | e30f545ef32b777100289c3a6c1646f3 |
|
BLAKE2b-256 | 41dd80cd254488410ea4245f69c91f4d7e4da7b4d74a839f9ba8a14ee41c5e58 |
Close
Hashes for pylibsrtp-0.6.6-pp36-pypy36_pp73-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e128a6e0344a7ec1fbbbf54b2287ae3944bd98740e12c2db0fccebdaedf6d847 |
|
MD5 | 3f174005bbaa2045083b5c3be40d33f3 |
|
BLAKE2b-256 | 4b8e31ba8667ba449abc8319247cc7fa5104cd19db1b166ba85d172899df3253 |
Close
Hashes for pylibsrtp-0.6.6-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af28819aa9c3ddd6c85e1abe9abc739a5fb596cf2e932f50b17df02313f2b75b |
|
MD5 | bed74e9920375322d0947bc413cd05d9 |
|
BLAKE2b-256 | 45222e002c7449dda610f50b7e42472327b742ee6955b16c49b711521f084600 |
Close
Hashes for pylibsrtp-0.6.6-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f20773a4e15c805d66aae9129e1b74ff4fcf06ff07e868b1dc34bf068b97b52 |
|
MD5 | 298115affb3564adb3c5ea0ceebfac68 |
|
BLAKE2b-256 | 101758b527b98bc3ab3a57e3e5d9dfb0616decd8ced7301d0de513b7cf925835 |
Close
Hashes for pylibsrtp-0.6.6-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2f95c6153eb05da981267c3d7fdea793807960cb823d6a9d7e88dd42a484498 |
|
MD5 | a74744116e5c179d2a38006bda20cebd |
|
BLAKE2b-256 | ec94e2352a7ff627874bcbf567a2003b22a0818349812b688eeb37b190c30335 |
Close
Hashes for pylibsrtp-0.6.6-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88d0599af067f1f031253cb858a4533c99d742e75df8993bfd4f7cddd47a2a15 |
|
MD5 | 95f3bffc81e15e94cee0b10e40d21b49 |
|
BLAKE2b-256 | 41510f6effeed1b6874ce46c36a7ec3bb09ade25757e6fc6f49474829d20cdac |
Close
Hashes for pylibsrtp-0.6.6-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9f4e7335fc28bea9f0212707a726e0a5437ebbd0484b16cad1510a26093496f |
|
MD5 | 7bd15f460eace58f5ca0d54a40cac71e |
|
BLAKE2b-256 | 80b7c3c5713cb23e2fd400b751e1b781339ddedc9ad0b9107290b90355c1a453 |
Close
Hashes for pylibsrtp-0.6.6-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c47d5ccc87d25bb9d9271533063cf9bf5056dc7e8a6d7c5eafcf04597806fe0 |
|
MD5 | 90d80cb11f041448fa716c3920200010 |
|
BLAKE2b-256 | 80df560f9947ff8d674520f3ff75e82751ffeb1aefa344abfff05091325ffd76 |
Close
Hashes for pylibsrtp-0.6.6-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a68c3f63665dfca7aa024018f6c2836f048314f0e160ce583f8dec8e3e428ca |
|
MD5 | a65c87ec20bf55f5587c425537bab860 |
|
BLAKE2b-256 | 34a2cdd03202a6676a9e87eedb1b587c7ab58ef7138a5d5832edb78187efed3e |
Close
Hashes for pylibsrtp-0.6.6-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 133a0d88354c7779605f9386636ccff8d7d373f3e24183b72315d1c259810017 |
|
MD5 | 6cc72a0439fa5d49c17576f3797bda39 |
|
BLAKE2b-256 | 39e331f62c1b62b16cd4f17716db97d065bbc745e35433c17e99706d3c1610e8 |
Close
Hashes for pylibsrtp-0.6.6-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 904f5b9eb8de4c85d5214742ad602bd42528d3dce2779168307b83609a65cc8c |
|
MD5 | c5424b14a18f520b0d3e4fc63fd05d8e |
|
BLAKE2b-256 | ed0c76aa10c2c227b7d81ffd1919f93e99c56c89dc91c4b6ae5ce8e903de3531 |
Close
Hashes for pylibsrtp-0.6.6-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05db3efdfa4eee7d937de291438aa7582a35be11b15a8a5af523302518483d38 |
|
MD5 | 52ff3f29b00c2bd6d12031e0f50efd6a |
|
BLAKE2b-256 | 4b2e7e4147cf13d68e39e40cde6be71365b42c28cba1d432a25bc1413c2feb21 |
Close
Hashes for pylibsrtp-0.6.6-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e5f17bd0c60a4ddae91ed2f6116a6e776b997c488eb1c4cd06091b33a5cbfc3 |
|
MD5 | 3918b6f0f50e2165ba388abe160477de |
|
BLAKE2b-256 | 9bdee20dae3bb995579014a48dd8f297b10de0bc297c6396b4bc630617b44d48 |
Close
Hashes for pylibsrtp-0.6.6-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bca9061bfe3f6c439d1380530e9174eca94ae3be11f162b4aca91737685712c0 |
|
MD5 | bc0bdb13bfd74453c125aa6b96411e36 |
|
BLAKE2b-256 | f7293dc46a11aca29af26b4bfaa93ffa6c5d96ae531f465c8b0eb543ee27392f |
Close
Hashes for pylibsrtp-0.6.6-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 099250642c00c072f4895220042ad6e11b8932b20599ab7398e959035b93dec4 |
|
MD5 | b94e72eceba9a5a813e6554a082e8782 |
|
BLAKE2b-256 | 11cc89985f4c15320ed0d52b4074fd6f7baa6dd567d79414c10c9dbd9ade39b2 |
Close
Hashes for pylibsrtp-0.6.6-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aca96394af234eccc279ad020f0a021832873967b0cba31da2cdb7b95122439a |
|
MD5 | 6c08ef11bf3ced026e2969c017586de3 |
|
BLAKE2b-256 | 3946b69e05fa3e2f79a1bf5e7c9c012183125e45d803e0dccf075a0d98c97d3e |
Close
Hashes for pylibsrtp-0.6.6-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d365d496ea986e1917ec51f0271d21d593c1cc2aca0fb0e5e048df8dcaa0c87b |
|
MD5 | 0eb341b734e228c514a271f8d3ffdcaf |
|
BLAKE2b-256 | 62b726d90b2f86a97720dfb289aa5ffe2617d7316d184e0fc7280693327829fe |
Close
Hashes for pylibsrtp-0.6.6-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 706e3dd7637dda92880e35dd7c20d532a30a8ef18715e1339e72ed201573233e |
|
MD5 | a70ef2dcaa7fc47227967e607a508d5f |
|
BLAKE2b-256 | 59a7867cc4fbb4cb90b6cd74542e0357c2d86cde68d698725dae10524df7dd2e |
Close
Hashes for pylibsrtp-0.6.6-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1ecf2f04bb5b25b67f5b41882dd999c9577842536878f41f980f5142646f698 |
|
MD5 | 1e2b247a87cff1f59b4e7e07769b5709 |
|
BLAKE2b-256 | b825c1153983dba1568bca95f3000a10736cfb5f3affde457d2a0db2b577edf4 |
Close
Hashes for pylibsrtp-0.6.6-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ef1e051bfd4b59d7495541bbec4d9d6cfd2b74d762943c63358c811892dbb8e |
|
MD5 | 5abfca3faaafaf9dda3d31074135c048 |
|
BLAKE2b-256 | 4d344745adbb322c49d2ee1c10cfc430f10f533f7d992d502cce9edfbfdf505c |
Close
Hashes for pylibsrtp-0.6.6-cp35-cp35m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf11c75dac9344c42937ba0cf89b613a0a2682abb4a02153378cf18cec5e03fd |
|
MD5 | 5843663af337e62dde7d9ec3c9a53d04 |
|
BLAKE2b-256 | 0e549a851ec59774583010a4af0af634ae33ef5db0a730651de026cae3e8de5f |
Close
Hashes for pylibsrtp-0.6.6-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f06b4fa7e6cedb1050ace08e3e5d378b32924e63c79b70877cafc42190facfcb |
|
MD5 | a8ead6e4d8099881114965c6a4b5725e |
|
BLAKE2b-256 | e68207480c344ae8c2bec80b634452f914f01e6edb2f97fc5cff3d06ddc3e9dd |