Skip to main content

Python wrapper around the libsrtp library

Project description

rtd pypi-v pypi-pyversions pypi-l pypi-wheel travis codecov

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


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.2.tar.gz (9.4 kB view details)

Uploaded Source

Built Distributions

pylibsrtp-0.6.2-cp37-cp37m-win_amd64.whl (48.9 kB view details)

Uploaded CPython 3.7m Windows x86-64

pylibsrtp-0.6.2-cp37-cp37m-win32.whl (43.1 kB view details)

Uploaded CPython 3.7m Windows x86

pylibsrtp-0.6.2-cp37-cp37m-manylinux1_x86_64.whl (65.2 kB view details)

Uploaded CPython 3.7m

pylibsrtp-0.6.2-cp37-cp37m-manylinux1_i686.whl (62.8 kB view details)

Uploaded CPython 3.7m

pylibsrtp-0.6.2-cp36-cp36m-win_amd64.whl (48.9 kB view details)

Uploaded CPython 3.6m Windows x86-64

pylibsrtp-0.6.2-cp36-cp36m-win32.whl (43.1 kB view details)

Uploaded CPython 3.6m Windows x86

pylibsrtp-0.6.2-cp36-cp36m-manylinux1_x86_64.whl (65.2 kB view details)

Uploaded CPython 3.6m

pylibsrtp-0.6.2-cp36-cp36m-manylinux1_i686.whl (62.9 kB view details)

Uploaded CPython 3.6m

pylibsrtp-0.6.2-cp35-cp35m-win_amd64.whl (48.9 kB view details)

Uploaded CPython 3.5m Windows x86-64

pylibsrtp-0.6.2-cp35-cp35m-win32.whl (43.1 kB view details)

Uploaded CPython 3.5m Windows x86

pylibsrtp-0.6.2-cp35-cp35m-manylinux1_x86_64.whl (65.2 kB view details)

Uploaded CPython 3.5m

pylibsrtp-0.6.2-cp35-cp35m-manylinux1_i686.whl (62.8 kB view details)

Uploaded CPython 3.5m

File details

Details for the file pylibsrtp-0.6.2.tar.gz.

File metadata

  • Download URL: pylibsrtp-0.6.2.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.2.tar.gz
Algorithm Hash digest
SHA256 4597ff2243d0ee71e1ac21f7fda52abb157a58615e8530ea200c9f7394b463b3
MD5 4d37fc0f5c44b44b86343e8bea537c0b
BLAKE2b-256 c7b4ea72ee6ecf866ae787613cc6085e9540f678809b7980e888b1f498dd17e3

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.6.2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pylibsrtp-0.6.2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 48.9 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.16

File hashes

Hashes for pylibsrtp-0.6.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 ad44c7808087cffd7b77c66287cc8aa52909ac8814c0efc9b9f47810cb83d1eb
MD5 4ad32801f050a87272a7847778a6fd7c
BLAKE2b-256 5acb4acd063e76878e4a34ccdde78280f47c0bd9bff3cf08e9eee832e1c2b82b

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.6.2-cp37-cp37m-win32.whl.

File metadata

  • Download URL: pylibsrtp-0.6.2-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 43.1 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.16

File hashes

Hashes for pylibsrtp-0.6.2-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 288b9cabd69f04123574487027ae52f5b018d8aadd7647c31459fc10b536920c
MD5 760d7dfe7bffe7e545c70224b0275c98
BLAKE2b-256 a41c099e30e8e3991d5ba35981a37734a2f8b9317a29385c582a3cabaa021e81

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.6.2-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pylibsrtp-0.6.2-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 65.2 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7a6dfb2608735d2d28746dbf4efff0349db83d4efc242b6dbe22b05c72c17ee0
MD5 e9585f99592679f176db1555b7ebdd84
BLAKE2b-256 bdf13d5b5f7ffa9e8fdef5febe164e5be05759aa8d5d5369f942197194617e73

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.6.2-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: pylibsrtp-0.6.2-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 62.8 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.2-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 39db1765a994fa5ca56b279e7e73f727aeacd81c07ea510248251923d7059a2f
MD5 651da225672b758f9349862272670ef2
BLAKE2b-256 9ed033a2df24aee9607a78a36d0a98ddd37d1aa7b7aa4b6a384e4c1a76bd43d4

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.6.2-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pylibsrtp-0.6.2-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 48.9 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.16

File hashes

Hashes for pylibsrtp-0.6.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 30895bbe0936452075131e7ebe69bfd211fd66041403bf4b6038a26e520a7958
MD5 4b56430f722cd178f69cd97cbc204bd2
BLAKE2b-256 4d4d79f9d36a2208efc0907ed99b00926ca7efbf29056a506f02c0613b684dc1

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.6.2-cp36-cp36m-win32.whl.

File metadata

  • Download URL: pylibsrtp-0.6.2-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 43.1 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.16

File hashes

Hashes for pylibsrtp-0.6.2-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 94887bc0d38279860ebef1f678964e764bba7d6395fa97c9f6e0e3809282767d
MD5 5e876f410db9e3cc6838184913e9419b
BLAKE2b-256 9ef9fa54875f62bdd1cf12b3e95f11a5e38eb92465de924a148c7848b5c6edc2

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.6.2-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pylibsrtp-0.6.2-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 65.2 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a43882069634e5e840325ff118c69f3e65943db64bd2feb272f0737c28b995aa
MD5 a928145ceb1e157bd0ea0ab6291f3521
BLAKE2b-256 526ace551279912fcc182e607cc9bded8fa4245b166b996fea447e57fa79771c

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.6.2-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: pylibsrtp-0.6.2-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 62.9 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.2-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 c0d33193a543b4f3372d79292ff24ed62cfa664c1ebc30bbedbfc690f75d0aae
MD5 3d36af865bbb0c31b0cb26f8fbe94753
BLAKE2b-256 238d5eab8dd83c71d34fd45ee17fd19a81efb216b8ae2b6e86db8a235ec00ad5

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.6.2-cp35-cp35m-win_amd64.whl.

File metadata

  • Download URL: pylibsrtp-0.6.2-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 48.9 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.16

File hashes

Hashes for pylibsrtp-0.6.2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 d8aa915fbb3df54d44c78a70d82c22ef28a6503cfb36e86118bc245303205279
MD5 bb7a16ecb3229a0e72d6d79a48730008
BLAKE2b-256 3001e67838496d9e27e5a0b2ab0c70c8fa28c8eddbd90dc1c7b3071219bf62f9

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.6.2-cp35-cp35m-win32.whl.

File metadata

  • Download URL: pylibsrtp-0.6.2-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 43.1 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.16

File hashes

Hashes for pylibsrtp-0.6.2-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 df6cad5209813b4f4744d94c058abeebd447620ff5cb66e2baa5be6eea63f635
MD5 85cb1df8d59a9312e8189b6df3b68a7c
BLAKE2b-256 8fdd7b3a11b9091f63db0e5076b390d02f39258aec1875ab0f3a9969f851ba9c

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.6.2-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pylibsrtp-0.6.2-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 65.2 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ccb8776196cb5e810375232a1d07415dd7161b03a8aacda10fb512dbfbe9d525
MD5 1da7cd4bfde0249dedbee831e6d0c8de
BLAKE2b-256 d591a8d6386fcc194bf807d8efd4570c9567aea945f5df0f3d26b3fbd1c17427

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.6.2-cp35-cp35m-manylinux1_i686.whl.

File metadata

  • Download URL: pylibsrtp-0.6.2-cp35-cp35m-manylinux1_i686.whl
  • Upload date:
  • Size: 62.8 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.2-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 334fd48100e8202de9a2ea53ba589dfa6f413c30efc81f25b74d8b58e55e2683
MD5 445b224c099e178be6549d6d77d28728
BLAKE2b-256 3e6de1c53a8baae9e688b931630c11f2b45409f1ddbabb989371e466fa347754

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page