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

Uploaded Source

Built Distributions

pylibsrtp-0.6.1-cp37-cp37m-win_amd64.whl (48.7 kB view details)

Uploaded CPython 3.7m Windows x86-64

pylibsrtp-0.6.1-cp37-cp37m-win32.whl (42.8 kB view details)

Uploaded CPython 3.7m Windows x86

pylibsrtp-0.6.1-cp37-cp37m-manylinux1_x86_64.whl (64.9 kB view details)

Uploaded CPython 3.7m

pylibsrtp-0.6.1-cp37-cp37m-manylinux1_i686.whl (62.6 kB view details)

Uploaded CPython 3.7m

pylibsrtp-0.6.1-cp37-cp37m-macosx_10_6_intel.whl (55.2 kB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

pylibsrtp-0.6.1-cp36-cp36m-win_amd64.whl (48.7 kB view details)

Uploaded CPython 3.6m Windows x86-64

pylibsrtp-0.6.1-cp36-cp36m-win32.whl (42.8 kB view details)

Uploaded CPython 3.6m Windows x86

pylibsrtp-0.6.1-cp36-cp36m-manylinux1_x86_64.whl (64.9 kB view details)

Uploaded CPython 3.6m

pylibsrtp-0.6.1-cp36-cp36m-manylinux1_i686.whl (62.6 kB view details)

Uploaded CPython 3.6m

pylibsrtp-0.6.1-cp36-cp36m-macosx_10_6_intel.whl (55.2 kB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

pylibsrtp-0.6.1-cp35-cp35m-win_amd64.whl (48.7 kB view details)

Uploaded CPython 3.5m Windows x86-64

pylibsrtp-0.6.1-cp35-cp35m-win32.whl (42.8 kB view details)

Uploaded CPython 3.5m Windows x86

pylibsrtp-0.6.1-cp35-cp35m-manylinux1_x86_64.whl (64.9 kB view details)

Uploaded CPython 3.5m

pylibsrtp-0.6.1-cp35-cp35m-manylinux1_i686.whl (62.6 kB view details)

Uploaded CPython 3.5m

pylibsrtp-0.6.1-cp35-cp35m-macosx_10_6_intel.whl (55.2 kB view details)

Uploaded CPython 3.5m macOS 10.6+ intel

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.1.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.1.tar.gz
Algorithm Hash digest
SHA256 f134b72b63ea508766ae8a517328e65d9ee1448c6f0b44b24da2301666930af1
MD5 090f16d1d6652ace5866dd27fb89483e
BLAKE2b-256 5796626c1dbcac770b233290d5f23851bcf78c4e345db5a021bb519e2f8afbc1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 48.7 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/2.7.15

File hashes

Hashes for pylibsrtp-0.6.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 f75adb8ae3c343b45baf4a6add5ad08278bd278dfb320e840d8f81d10a4ac374
MD5 58ec0c7e3f793673d9a1b64408e6b4df
BLAKE2b-256 9e69f57cc7bebe317bcbf4d487accfc25775321257ab34232c8b858a1489d937

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.1-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 42.8 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/2.7.15

File hashes

Hashes for pylibsrtp-0.6.1-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 268a944c25c1c2e942b678771fddc8f3db6cefdaaf691ef74c56755ec51fae1f
MD5 0e588917c8fb19207a1737013e8e865a
BLAKE2b-256 f7d1b78f93e840751f5d55a987841b3d0537e423df7e0b4dd6b7ba17e269d094

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 64.9 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 db72aadc29be5bb45a5fd3fa827596854fc1d4e40976577114f16fad9aade691
MD5 306451ac4e94c910f73e51704f7584e9
BLAKE2b-256 57d106958fc469800052ddf28652b4b10921ffd7fe2107a12732e6e4039cb5b4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.1-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 62.6 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.1-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 72c757857c92ee4158cc822d33fa169a768b4e13d8289ba3dab9d2572fa6bad6
MD5 2c31da3eb0198ca3a6f6ea80b9962c1b
BLAKE2b-256 6149f74a2b436541f732abfbceb12647b264e4bec27371d72be011b5ddcce6da

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.6.1-cp37-cp37m-macosx_10_6_intel.whl.

File metadata

  • Download URL: pylibsrtp-0.6.1-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 55.2 kB
  • Tags: CPython 3.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for pylibsrtp-0.6.1-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 ba6387791cd180e2d370d7019261445b6ee2c1ec53f1c4d7cb9040d8df7c9304
MD5 516a89ad90dc17d3bd6af556525a4034
BLAKE2b-256 db6df4e032afd24f34e0fd4ca7fef162712e4382d7464a13fbd1b10de912c386

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 48.7 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/2.7.15

File hashes

Hashes for pylibsrtp-0.6.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 8efffa4472322fabfa13362e342bb74664ce68315ff89634cbadd37de5a0084a
MD5 926c3ef055496193f4e486589a842a80
BLAKE2b-256 03f39df7d99499707ac2f5a393734621b44ecca78b00b3343d51f3f03b68e5b7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.1-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 42.8 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/2.7.15

File hashes

Hashes for pylibsrtp-0.6.1-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 767dd3f340feee910930d7c482a13a763f5fb83f1dcef1c95dee48ae9f222394
MD5 abcd72f49453e521413457802a4090d4
BLAKE2b-256 e478c13f6abbd558cf8b9fa1eb0af798bb41b4858c7f0c36e794e3d998d49843

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 64.9 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2d67c056e39f8a8a6cfdb98e2bde1645540cf3b3c6a81355a7b162755c866a1b
MD5 dd1d453d1fd42a25cf08f053cd3b0b4b
BLAKE2b-256 4138e27a9a8c5a643b2497612ff9d160a645034d82ac42c36c413bcf64acde81

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.1-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 62.6 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.1-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 ca6c65db02345f4e194bb0631e69f029985ad742f59854e3a5849cff50791c44
MD5 c6cb5cf71ccb6dde12fb82e8a73bf5c0
BLAKE2b-256 8b86d6cb4ec2683534dcf01e247816d7d0837605d59f1314f276367671e88cef

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.6.1-cp36-cp36m-macosx_10_6_intel.whl.

File metadata

  • Download URL: pylibsrtp-0.6.1-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 55.2 kB
  • Tags: CPython 3.6m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for pylibsrtp-0.6.1-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 7282a95d915fb69ec7944acd4a98782a4586d0befe0105d935b6904176eac1bd
MD5 12d9ec282159d323cdd36f56dc05d8c7
BLAKE2b-256 2f21025dd2430d4748da56afa4967f345f31fa8ac512610354d40dd7de16b780

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.1-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 48.7 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/2.7.15

File hashes

Hashes for pylibsrtp-0.6.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 c213109750c39629e1090a73dcc8f6e51a5719a2cfea7bf89b8c4644929f2842
MD5 4b3179076daeddba724863410440f0cd
BLAKE2b-256 2880ba7aea1c38fcc71bd3a20af7080ba4d99165f713787a632565d104c87ec9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.1-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 42.8 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/2.7.15

File hashes

Hashes for pylibsrtp-0.6.1-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 88606d2ae17e6f510d45d756024676510f9dfa99e5df3db4ba46ad16ccda9f58
MD5 b96e9cc0b4266d3de4abae38a719b965
BLAKE2b-256 5a555021daa4d0110b728ab59339502cb61e48a5ec694e5dab54604fac4c9061

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.1-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 64.9 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9de3f4c49d1cd6a4fcc01da78a5a310da5997a18562fe7e59602e582e107110d
MD5 a9b512b55d70bc0d102839f084ef43c2
BLAKE2b-256 62df093d710d06d53ae17e45d9879132a7e7956698ad2b795d6c86b84349ab6c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.1-cp35-cp35m-manylinux1_i686.whl
  • Upload date:
  • Size: 62.6 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.1-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 407e63fd9d39f592b0ed61a9cc78df3d818da35a9356bafed94e32686fca80b7
MD5 6ee03dc7f1a5b0b3820d782a07890f9b
BLAKE2b-256 f7c755653f319f768c557bdc54a00ff13eec382ec07128f30b9d5098b3fae415

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.6.1-cp35-cp35m-macosx_10_6_intel.whl.

File metadata

  • Download URL: pylibsrtp-0.6.1-cp35-cp35m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 55.2 kB
  • Tags: CPython 3.5m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for pylibsrtp-0.6.1-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 fd1df78a49624712051b22c4e73697ea342aa40d11ec36220d49a7a90d0f3c2a
MD5 000c98e105982646aa3bd4fc86fb9182
BLAKE2b-256 6b08b7d8a2db2a631dd99ea8bdac77c6e117ee293c10672a0593ef767a01dfb4

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