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.7.1.tar.gz
(10.3 kB
view hashes)
Built Distributions
Close
Hashes for pylibsrtp-0.7.1-pp38-pypy38_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db3e6ada45fa0da90949e74a7e0ea7e042e0677adeb4387dc645bc9c95ab9ce3 |
|
MD5 | 6f92275320e585ae5a372bb8a12ea117 |
|
BLAKE2b-256 | 5e4e2fbcd8864fd2fea24c04c23075a37a3b9882be237fae9464baede360f946 |
Close
Hashes for pylibsrtp-0.7.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55aa7dd8b3d757bf7933c46425310752266dc286dcf362fa29c14c528b9ccbeb |
|
MD5 | 58ba0b11a848d4324852007f357bb947 |
|
BLAKE2b-256 | 3665ea81faf9c74d0aaa24adf02b15954a81029da7db943b3b7560ce2e9a9729 |
Close
Hashes for pylibsrtp-0.7.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01e2cf69173db208dc2991e4c7d404d0bdca14784b726970255771a91573fdfc |
|
MD5 | a8461460ad898f3e4e68bf302379d0ec |
|
BLAKE2b-256 | be4dd1b6b28f56bb0b43188b5aed094fbc05a09c63af96fc3dca62c994cf17c9 |
Close
Hashes for pylibsrtp-0.7.1-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a49b55757fcf68789c845d13611da3bc34e14951dddb14aa906f38ce756b3abf |
|
MD5 | 3f7a69bc774aa88fa9a4d84e75e51202 |
|
BLAKE2b-256 | b653ac929fb5d507f65068e4a912cdda7f8a38ff6d6de48a2465deeda7352d96 |
Close
Hashes for pylibsrtp-0.7.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab4861d5f9d897f5a02a807d68f60b9b34c3b95c335b8f1b7601531273e0db82 |
|
MD5 | 5ab0c0a00eafac3d01a644d9bb6bb300 |
|
BLAKE2b-256 | 2ed9521b43649bd46ef8249503d71bc3ca51f2e29e927f62c565f33b15c77ae5 |
Close
Hashes for pylibsrtp-0.7.1-pp37-pypy37_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81ac53a783521593cef1f18e1ba25957f2d35bb17bfa7ec91ebab0253b9466c2 |
|
MD5 | 4c4d916c8005efbd6ec86eabd8df4d5a |
|
BLAKE2b-256 | bf0d83a955ed432d53b3c388e38348adba79fc624fe1646165492a9107f0ca18 |
Close
Hashes for pylibsrtp-0.7.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bf0839d3d427101d081360a9d17b465716a2d6309d0425a7f4ff8a4a027137d |
|
MD5 | 331648bf409b15a87f88cc1264eca04a |
|
BLAKE2b-256 | 3ea5f4b162264bcb74f9c39f79e766f9cb16538f360d79c90f6b6bb56c5d3476 |
Close
Hashes for pylibsrtp-0.7.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc7d4addb1a4aeafb439469fd7b42b48280d871fa64c62851e20e4423a80722d |
|
MD5 | 5398dfa54f09e50b1023845287f6406f |
|
BLAKE2b-256 | 2a598909db7a336ca8fb6ed822a12e44fd8f47af36eac2057fc7da95450b1704 |
Close
Hashes for pylibsrtp-0.7.1-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11e7cc6561ac2bff00568fd1791c29a88a4542b3ef87fc3eb5d5152e3f08a968 |
|
MD5 | ce9e045213c7192ceb8290d084663dbe |
|
BLAKE2b-256 | 5335b131048188eb68a95d99ce6acd5d5e3f1f379bcc482870c8fe2c4b6cb702 |
Close
Hashes for pylibsrtp-0.7.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fd50c211f2a7316c0580e42fce92325544197cc54ceabcdbc7e747fb94da55a |
|
MD5 | 5f56972448d1c6e1c5df0478eea4fd40 |
|
BLAKE2b-256 | 36e57cec4792d3dfef2e79d0189b7348797489e927267786b8cf04ca4f0995a3 |
Close
Hashes for pylibsrtp-0.7.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1004d13393936fa62a70cfbf89edd794844682c6f06636c034272e97708737b |
|
MD5 | 23aba6e85ce2324f522890214c79da34 |
|
BLAKE2b-256 | 152145d8a37993904fed9e618a40c8f9b3f6996d42388cdfb943023340350069 |
Close
Hashes for pylibsrtp-0.7.1-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e740ee6df460584d7dd365195b90b51be37dee2e5c58e9ad3e894eed361a40a |
|
MD5 | 0571ecddc321a3948bcc3f70ca35d8c2 |
|
BLAKE2b-256 | 2ddd80601da2cbc456469cb4b966475e205ddab6dc5e97c92311f4d276a5028d |
Close
Hashes for pylibsrtp-0.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fda05473a3d2ea9e6b71efd08ceb4a74c7ff95fb24427c3c168ad77c9a14fd4 |
|
MD5 | 533c833b339259463cb79d3fe08aac5a |
|
BLAKE2b-256 | 73e46951bd8dffc1c2aad00ef4042dd17da4cff77fb1a9ec723579771125b8e7 |
Close
Hashes for pylibsrtp-0.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 821b10551659fe1e1da9fb45f84cc11591a94a4ca59b42b456902442723e47a4 |
|
MD5 | 814c8d3b76e519fa6007ba0bf73176c6 |
|
BLAKE2b-256 | e59902e34b69e25bce863f5efa1c4bd2bfacf3b5668d0828ea7c2d791c0cb27b |
Close
Hashes for pylibsrtp-0.7.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d54f8fa610d7b4bbeb036a4a07c7ec3e7b87d971d4389b3d634b2694486e85b |
|
MD5 | 883bdc24c1d23db6a3e6cab65980e9ef |
|
BLAKE2b-256 | 7880bb1659eb4d9680f3f276364dd7086b13bb3b21be467e2316a14004fcef99 |
Close
Hashes for pylibsrtp-0.7.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d0bb7410e0b949ddfb802d29445e5e98d2854f9e25f5582b7e17d86cb50bd37 |
|
MD5 | 82b72293b4f18151dabc36d32ffa4f51 |
|
BLAKE2b-256 | 06c634944cbc7669b2a594b39a4626a4b2f271b9fb2c8941d4f386f40e1c6b6f |
Close
Hashes for pylibsrtp-0.7.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9affed55aab0b3ff7502bce52210d0c6b6957e9f6fb7730ce27863b4c4ec8ad0 |
|
MD5 | 6b7df49540473500bc8b5fceca7d0047 |
|
BLAKE2b-256 | ed3c90fd2db5d7cefcca68c1ed9f251726619dd3863bfc8439f7cc13fb25115d |
Close
Hashes for pylibsrtp-0.7.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ace53f23ff5c00f6552a4c14f76bdaeb63a4e9567ff550a6049fe4374548307c |
|
MD5 | 3404563e488f959e3e1e0b4f63bdf59c |
|
BLAKE2b-256 | 3c098ca22e936f91bb547f73ef6341f54c74788019f7d698baa58f056078b44d |
Close
Hashes for pylibsrtp-0.7.1-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4158970899d723d9a81e7b323d6dc9c0e0fd02208ebe12b530dc1b842354d73e |
|
MD5 | be7012a79c853d866dcf2b7d8c4cf18c |
|
BLAKE2b-256 | 6d5fec90dbaa765d6011e7f75fe7a691831ea04be1e4ade990ac48b699015c34 |
Close
Hashes for pylibsrtp-0.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 738bca685b6944c11383ebce1dc3ff471b996ccf9ea814fdd3e157cdff6a2c65 |
|
MD5 | a789dc447ca3a370166d24fc665edd5f |
|
BLAKE2b-256 | ec7006d0578a59d6fcc3afda0a4ea132368fb4954cafe861d7f138875e41ce00 |
Close
Hashes for pylibsrtp-0.7.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6706bee2c8122f0148840aadca7194b41f7f22aa58ec9fcb68cf8473795b4de5 |
|
MD5 | 17a153a9f7b4dd0c3f89c7e57bee4914 |
|
BLAKE2b-256 | df1337f4e3b0494621c07a6b6f1fcb251f1c9dec554b7a08a2e60d332c5ac5b3 |
Close
Hashes for pylibsrtp-0.7.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d6e3db0a8e2b202ec6342c999411365c082a496a07123c3a7ae00b1d312b0b4 |
|
MD5 | 6d6956d8fb41ba59ab518537bb9340e1 |
|
BLAKE2b-256 | f5e8763552eac2aa3f6e9410d5b654d05c52e7058533c6e4257fa3367bad9aba |
Close
Hashes for pylibsrtp-0.7.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c15fbc4b4a949637c2398a99dd7f5b9df1d5dea97dd1ecc38482c4a0c069abd7 |
|
MD5 | c432613575e77d552ef19dbde4cc0447 |
|
BLAKE2b-256 | 5ffc21b97ae9c3bbfcb362bff470e8728c50657d36ba444269bc6785d0736b15 |
Close
Hashes for pylibsrtp-0.7.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b53d527b15d49e7ff792b59e991024dd3f657b5c8da8231c29fa47bd89b50ffc |
|
MD5 | 35adecb73c5176943d8aa5246b5cc98b |
|
BLAKE2b-256 | 38d212635f5358db3ca87df6a088b98456b5fb486afe739b146481ac09a13564 |
Close
Hashes for pylibsrtp-0.7.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8984305629c5924b549f168620862bb663e3fdacaf6c05e8b054ffcc954d5e0 |
|
MD5 | 87a8e2f147057c554a782ab89a69e460 |
|
BLAKE2b-256 | f2f15e43a2035b4f082049d19570b03b4b705b1aa35c4371e97b7e7fe8d7f349 |
Close
Hashes for pylibsrtp-0.7.1-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b954ff493f58dc547fd99e492dfbd30625f076aa0b0ea4a5c05f6e3f8868f67e |
|
MD5 | 50ae38eb2f512eb873e1044935ad6a92 |
|
BLAKE2b-256 | 37f99db2186482d8936c4aad1591806a61b3226f3263a4bb11f37f69cc07515b |
Close
Hashes for pylibsrtp-0.7.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 567952a29aa2334fe91a5aebc158ad11a48885e0f6e5df4f7280d5daf220d3ff |
|
MD5 | d8629e540a3b002849bb053248611466 |
|
BLAKE2b-256 | 7820edc012c4539be7b1d37645eb895425d4d6709b20704da0811fc65122cb7e |
Close
Hashes for pylibsrtp-0.7.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ab6c8882dfc980155a9fbd6a3ef247459bca965387d9bc1aecd467e07622960 |
|
MD5 | 7f2ad9de8c691670017c63040c15c4d7 |
|
BLAKE2b-256 | 1cf7dc0a854ce81a48d78efac0e7f600c70484fa6c81ae4fba2c464f5f566a1b |
Close
Hashes for pylibsrtp-0.7.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 275bb2bb438e6d0b345adb74b6209104e76dca799312f3dc696ab83b89a011ac |
|
MD5 | 5ffea08a6d428cf48b49cfe8d4d36f13 |
|
BLAKE2b-256 | d588fa9fbe8eba28c9172ab549ae9890e2574fe2d9ab56b62a3758653686dc26 |
Close
Hashes for pylibsrtp-0.7.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5613effccbc16148a4f02a541c7f78eaafdb793db41aac39effd057f356b1e47 |
|
MD5 | e1bb9ce7ba8da9f0cddb5d3e931d3550 |
|
BLAKE2b-256 | 59b526599edcd0b125659448f3d0368eb58525c33ec432c40b50edfee7cfb54b |
Close
Hashes for pylibsrtp-0.7.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3eef9639fec802766ff0c6a13f1a4e556ac1da0dafc2a7c5893cf10643567de3 |
|
MD5 | cda31cba714ea32179704d424f05fd60 |
|
BLAKE2b-256 | 0197d942c7636eeec1ec3eb6a31a8b95d74ba61b6bc8ed2113eb5a4b8c5e1ab7 |
Close
Hashes for pylibsrtp-0.7.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e13571385e435e3aaf5ca888a9db6f2073c959ba760cb6e8786610ef0d95429 |
|
MD5 | c3ee9ce90a24da3c994ac489219bf8a6 |
|
BLAKE2b-256 | 69c5221a78460b86108ea011ca427c20f017bc649e8bdce836c5d801cdd7fe94 |
Close
Hashes for pylibsrtp-0.7.1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae5c0a7e771c344a99acd58f71aef96f70ff39fcd30d96f4ab39e181266b4766 |
|
MD5 | 7d47bec383306b440b246ec0ad9444c7 |
|
BLAKE2b-256 | f8cfc5945ec9759d0b76f40df5c285c053e92901bd4fbf8f84de3f4865bf903b |
Close
Hashes for pylibsrtp-0.7.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54003065b90f963952628ff35453b9b47f660c25caf370203ea7dfbbccd6f1fe |
|
MD5 | 0185342f6578fbf51b25db0963208abc |
|
BLAKE2b-256 | 6ea3512102d6d041ab0ec812a85e84bca51fdb529936d1a5dc4f22ec24ace848 |
Close
Hashes for pylibsrtp-0.7.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83db2e74161321797bc2cabc30de300b63df6a02a478feb74ea2ade180f5e253 |
|
MD5 | 92e3f0f48cce561d78e03c5be6a4c2b3 |
|
BLAKE2b-256 | a057952fc7f9e7d5c2e4ba29a797ba8965df8d53ada4febcfd40ca1d4d62df16 |
Close
Hashes for pylibsrtp-0.7.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8272f7e8bf177997073de46ad051fd4c40c1058ae619e25336c288218d66a10b |
|
MD5 | 1929551edcc40f084c339866ebbf8333 |
|
BLAKE2b-256 | 1aa0430621e8c4921a0e010f9ec8a4630e7c95eedfdd152cc6c76653cba341e8 |
Close
Hashes for pylibsrtp-0.7.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00788b6b3d3ad16a15fac106e063fecb2319c251c7304ad97914491e07ca20e2 |
|
MD5 | dc775c6068e54840d61fe623e6b253eb |
|
BLAKE2b-256 | 7ece8c768da24f3064af318e9357c4fe838b201da9e5eeca3048779337c3cbd3 |