Skip to main content

Python wrapper around the libsrtp library

Project description

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

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

Uploaded Source

Built Distributions

pylibsrtp-0.6.0-cp37-cp37m-win_amd64.whl (47.7 kB view details)

Uploaded CPython 3.7m Windows x86-64

pylibsrtp-0.6.0-cp37-cp37m-win32.whl (41.9 kB view details)

Uploaded CPython 3.7m Windows x86

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

Uploaded CPython 3.7m

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

Uploaded CPython 3.7m

pylibsrtp-0.6.0-cp37-cp37m-macosx_10_6_intel.whl (54.2 kB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

pylibsrtp-0.6.0-cp36-cp36m-win_amd64.whl (47.7 kB view details)

Uploaded CPython 3.6m Windows x86-64

pylibsrtp-0.6.0-cp36-cp36m-win32.whl (41.9 kB view details)

Uploaded CPython 3.6m Windows x86

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

Uploaded CPython 3.6m

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

Uploaded CPython 3.6m

pylibsrtp-0.6.0-cp36-cp36m-macosx_10_6_intel.whl (54.2 kB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

pylibsrtp-0.6.0-cp35-cp35m-win_amd64.whl (47.7 kB view details)

Uploaded CPython 3.5m Windows x86-64

pylibsrtp-0.6.0-cp35-cp35m-win32.whl (41.9 kB view details)

Uploaded CPython 3.5m Windows x86

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

Uploaded CPython 3.5m

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

Uploaded CPython 3.5m

pylibsrtp-0.6.0-cp35-cp35m-macosx_10_6_intel.whl (54.2 kB view details)

Uploaded CPython 3.5m macOS 10.6+ intel

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.0.tar.gz
Algorithm Hash digest
SHA256 7c76f18e403f68ee4825345bbc811140b3f8a8ed28d1228295508d95db399af1
MD5 aa2e05d20dbb7dd2d2437dfa4cf1d9c2
BLAKE2b-256 75abbca419472cf7171b42aa56d977a6d1263ceadaf454c082a151cbad566b74

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 47.7 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15

File hashes

Hashes for pylibsrtp-0.6.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 a99d6cd5be5fb2b05929c74a58266d7381b9da1041175c036f57d30ee5649d51
MD5 080c30eab3a88f8cd88855b20eb942bb
BLAKE2b-256 9ebd604baff7b615698fef8495ce5bb4467e8de33be69cbbcc88d010a6bc1154

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 41.9 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15

File hashes

Hashes for pylibsrtp-0.6.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 e7048efcec8fe5c0772e29741f3933207bb40d567c0f5182be572cca8e6cb067
MD5 4d7deea141b9140fd07bb268e6840f4d
BLAKE2b-256 545fdafcf8a9a41be6a12c8d8efa35be6b6898c4f7fa17bf8307c941b61f3b92

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.0-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.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 504f322c5851128eb344d02dad8a608040f5b985a4b1f493c988721f6fa363c2
MD5 726ab87a6b92ec3468c64fd35d8fcec1
BLAKE2b-256 dcd4918ff8263741871da407052c206b59fb0cd3274eee5b03bfc3cc1448e488

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.0-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 62.6 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.0-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 c90c9694f851f62d731922199004f8bfbd823fb34bee94b133e27123f1283fe4
MD5 2ae1f9a4bd69c0d6e69c77da736acca9
BLAKE2b-256 e03e2b04f09dcb381bcbfb8720fe7d5a931f331f62733ca41caeb44e81674992

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.0-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 54.2 kB
  • Tags: CPython 3.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

File hashes

Hashes for pylibsrtp-0.6.0-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 082efca3c06a538f839287cd117623003de8a1bb1de761cdce2993b95b05e249
MD5 e03fd52ce9fc2792fe11395612f5020e
BLAKE2b-256 d266ac460babd07ae3f727c3cb83c2fbc27f7f6f312360883d08d1fa9dd05f81

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 47.7 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15

File hashes

Hashes for pylibsrtp-0.6.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 424db9f942f44d4602a743a421a82afde6e8d2b7341122d5ad1303eb28215bf9
MD5 d2f5485da4c98956db6abeea786a2792
BLAKE2b-256 016e452040beecd42782e6878367b9ac87c68b212c1980e4eb068e6e515756bd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.0-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 41.9 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15

File hashes

Hashes for pylibsrtp-0.6.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 164c5b38fe5ddba2c0eaa0b69764e4088d6978ca6c8b691241406c81f055a6fb
MD5 bdcfa9cc1bb2c28749082ca89924fbde
BLAKE2b-256 77210a65a6ea02879fd4af7f6e137cb4fb14a64f72f8557112408462fc43124f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.0-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.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 666162ab73fa650b1bd6ed469e8132a8b316217f027d3915bbbe2952028534ce
MD5 726e12191ee7cf93518284effef5847b
BLAKE2b-256 bfa5285e6da47f081b0e3f35b31b6d3f5a0a832a402ef8ff5f92e4518b29d1bc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.0-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 62.6 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.0-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 d219a4bdb3ef8df721c957abba16918e243cd4f468976112a3cc4577f219ed75
MD5 aeaff7c790658b895a0d6df6bb60cfe7
BLAKE2b-256 ea20319bbe2ced1b56b2130cd7868d29dc9490f6e6925ae7fd0b49ebc849a2d5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.0-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 54.2 kB
  • Tags: CPython 3.6m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

File hashes

Hashes for pylibsrtp-0.6.0-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 7778858310095e5e86a7e478d54339f4eb758bdd5ec03913699e8572e1d1b0fb
MD5 30adf672bd5e275c67522b47de45b91c
BLAKE2b-256 d1cfccaf1ed5ef6e3e1941262f40c08498fabe2a99674e67770f634501aff5c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.0-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 47.7 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15

File hashes

Hashes for pylibsrtp-0.6.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 3556905b97b3ab9acae48a05c8af804752dd02f7a609f5249b7bbefc7c203880
MD5 ee57d934c898fdc392e1266c30962c32
BLAKE2b-256 32e46087c004a030f723b214a7205cd2c5af3ec4f2d5d35f1c6844fdb66e2526

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.0-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 41.9 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15

File hashes

Hashes for pylibsrtp-0.6.0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 47c1db319c9fb507daea2c2f79090e245c864f7a2008f5febf5a1bf9e626f42d
MD5 be609d011b5a705a87188ba745e6c662
BLAKE2b-256 0c0d5528c6b837e34b93d40f878ef0ccaba96e029fef1947c4cd1c09c9a9d469

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.0-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.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 55d0d749fe5d43432b0bdff6b7c3b62f90cc09502bcda588ed09c6a6d16d21a0
MD5 2533d8066c1bf5ce0449d95191c77216
BLAKE2b-256 6d821dabe3088043d754d8376c78d023e567917ab99fcd52e4efb90246d9d976

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.0-cp35-cp35m-manylinux1_i686.whl
  • Upload date:
  • Size: 62.6 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

File hashes

Hashes for pylibsrtp-0.6.0-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 9ae7208991d9eac804af8a2abe67380be42cc851e011a08932f16b6c3b5184a0
MD5 dffa8b3433b68b3a8c7b6a6a3f56d5d7
BLAKE2b-256 88da232bec95a8aa75f79cb036ed45f246f5b5bd06433f31b46b411228278313

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.6.0-cp35-cp35m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 54.2 kB
  • Tags: CPython 3.5m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

File hashes

Hashes for pylibsrtp-0.6.0-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 3e3e655b310c98ed59a10adb90660c3faade52a2861a9d5a0630a2fb9b32d9d3
MD5 b2521218e17c93e82d0231df33fab6c6
BLAKE2b-256 7d443557daf02b78545317495a6f31b684a84fa1cc6723df887d952599a5f79c

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