Skip to main content

Python wrapper around the libsrtp library

Project description

rtd pypi-v pypi-pyversions pypi-l pypi-wheel tests 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 Fedora/CentOS run:

$ dnf install libsrtp-devel

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

Uploaded Source

Built Distributions

pylibsrtp-0.9.0-pp39-pypy39_pp73-win_amd64.whl (46.2 kB view details)

Uploaded PyPy Windows x86-64

pylibsrtp-0.9.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (53.5 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pylibsrtp-0.9.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (53.5 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

pylibsrtp-0.9.0-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl (52.9 kB view details)

Uploaded PyPy manylinux: glibc 2.12+ i686 manylinux: glibc 2.17+ i686

pylibsrtp-0.9.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl (47.3 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

pylibsrtp-0.9.0-pp38-pypy38_pp73-win_amd64.whl (46.2 kB view details)

Uploaded PyPy Windows x86-64

pylibsrtp-0.9.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (53.5 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pylibsrtp-0.9.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (53.5 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

pylibsrtp-0.9.0-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl (52.9 kB view details)

Uploaded PyPy manylinux: glibc 2.12+ i686 manylinux: glibc 2.17+ i686

pylibsrtp-0.9.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl (47.3 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

pylibsrtp-0.9.0-cp38-abi3-win_amd64.whl (49.1 kB view details)

Uploaded CPython 3.8+ Windows x86-64

pylibsrtp-0.9.0-cp38-abi3-win32.whl (42.1 kB view details)

Uploaded CPython 3.8+ Windows x86

pylibsrtp-0.9.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (75.5 kB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ x86-64

pylibsrtp-0.9.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (74.6 kB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ ARM64

pylibsrtp-0.9.0-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl (72.4 kB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.12+ i686 manylinux: glibc 2.17+ i686

pylibsrtp-0.9.0-cp38-abi3-macosx_11_0_arm64.whl (52.9 kB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

pylibsrtp-0.9.0-cp38-abi3-macosx_10_9_x86_64.whl (51.0 kB view details)

Uploaded CPython 3.8+ macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: pylibsrtp-0.9.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pylibsrtp-0.9.0.tar.gz
Algorithm Hash digest
SHA256 e900cba9d993f87314c6bf95f400cb49eccbca276516280b36e1b63e5d1ad707
MD5 cd965169a48fa4f5ec45dff156d05de5
BLAKE2b-256 900252eac593cf457a55a384c4e6009d6b104aa46fd60a45f2ed715a60c18141

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-pp39-pypy39_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.0-pp39-pypy39_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 b281b214e07e5c1ce1322796e1fddf45b2c7bc2a0cac4022e2a1579f64365a01
MD5 dcd4fbac02692dfb4d787f5e7b90aaee
BLAKE2b-256 3c357731e91d1c9b8ef0339fa04582f96d281a5e48b1f9b9f776cd577bff79dd

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a708bba3e4892731fa6a468ec09e0e80b01425e01dcb9ac21541ce791e60c9b4
MD5 22edc2905066ff901e7a03deb49d0850
BLAKE2b-256 c9da65b8de4d185ddfdb9a62fb93164748a3f94c98019beb07ab3d7a20a80ff0

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5dcf6e6d3caed068cde750361fe790b5b5e42d6f8773648d8d75aa828b2172a0
MD5 00a4816c677627e70dcddaaa56e0c0c8
BLAKE2b-256 67e32f689c00f848f9d8ba89dc436d2a8970fafd633e801b6388e3a73f458da0

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.0-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 cfb4162329bb94b3b0afbf97ff0cd429f1fff872369122925db2687fac323482
MD5 42b33604bf1634a61e20097f29a21232
BLAKE2b-256 95980a4160090c534596b541d76651658adaba2d1fda388b7ae6dba9be882ab1

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 05f854732bec1ff90767520932205dc75214613b1a9f8ea718cad68f30f550d1
MD5 51e1ef63c607fd80122aad68492cf294
BLAKE2b-256 50c52c3c96a6c8e002b586c704c8a399aeb8088d2ead27cfbd651be6d07d9114

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-pp38-pypy38_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.0-pp38-pypy38_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 f760cdc7dbb8cc3b11217ea8739ed6a5ed52449d7b06be8adfc3b704008776f6
MD5 b55bb92f482251dc0ffab4f0196b034b
BLAKE2b-256 36a73210b003dd81ea4da4dff6c1f3847f5a6a183f78e77b85c12e32e49db1ed

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 53eca02aa33ea8fa677625e39758c64a72730f835e59a91ecf0fc4e1af8b8467
MD5 8ab134e0a856f1988a542908714e07c6
BLAKE2b-256 12932c088da4d3a9223ceeb49cb5319f26e26e1a3e5410042fb20d0b11265c77

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8d29927dbb72d7cd23980b3bb983d06c2a45c6403e2253c21392f266edf2f1cc
MD5 4da366864616815d272d60e515cbc8c4
BLAKE2b-256 1bccfeea569666e1317b8deaa6d10b5302bb39c7116958702da7c3e7ebfd1d77

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.0-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 c115d59c620785908ab8a44f6a895752a2c0910269f8bb63f5a722d4360b3a37
MD5 c88fd7e8c26eecdce7780f1b31362c7c
BLAKE2b-256 47484d9dbaa1012cff43bb389623e989d1383ddb4efd813396d9ce8a58b16e2b

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 06c0c7024350dfb108ca2830d37d01736dd6bd70f57acda35898c1d84b20ebaa
MD5 41c102745ea2bf69560ff9ba0ef9296d
BLAKE2b-256 44f5446941acd6efee418dca339a50451df3dee632cda81917616e2bcbf5d103

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: pylibsrtp-0.9.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 49.1 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pylibsrtp-0.9.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 86d1eb2e2278c18c043967787cdcddf2b140ff1730b40933092366ce52f87f49
MD5 77d94caf6e4c953cea28dcf708f73bf7
BLAKE2b-256 ae272135cd5a56d7db767de5f537407f1a815c3520d6126cba525ed2410059a9

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-cp38-abi3-win32.whl.

File metadata

  • Download URL: pylibsrtp-0.9.0-cp38-abi3-win32.whl
  • Upload date:
  • Size: 42.1 kB
  • Tags: CPython 3.8+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pylibsrtp-0.9.0-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 7cf330c27231d6e1ceafbf83e31a4e388bb0f021bf507aad58049a2e934888d5
MD5 1173734663e67623c591dbd4793861b8
BLAKE2b-256 48db58f5c5efde2d7e676e1da60ffaf0c162d00949e4b895c3b64223578d2417

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 421ce75863572ea4eec31cf36b27cf7ff4191834dab9bb782f2131bf5faf1f17
MD5 1fd6e0239b669df3effe7ac1354cdcc8
BLAKE2b-256 3931fde15ee5b1fa7e3bcb2dd77567993dbd37cacc3e45f29bd4d57c2379ff2e

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 300c06058173f4833073a6a9f512c12adb57b83a90ed90cc15f662f0328e737f
MD5 6cad59ab2b56f80ff5e86b278e0ef437
BLAKE2b-256 0d94e2de3ce0f5de6e7a0b2902072306027199ae1e3a7aaeee0d27860e5bc3a3

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.0-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 cb4c2091e5b05f4f31c2910bc07ab63439202aa9f0621272605c752c0b5207fc
MD5 53d97c02b78776f25efecc5e1be92020
BLAKE2b-256 93afe69ba9b5cec3fb905e2dfed9fa7235c3c6504c9ed52df27266fe4adb338b

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e0f60faa95350d0c0b0aa2f074645209d28b680a6ca7836e3e1f46e8b42ab4fb
MD5 ba17b1003e54750e67f42cb67460a1e3
BLAKE2b-256 56a8cc5a97f1785db93ba15a6aade50cfd0e3dd19cbbde2ebb10da708540e42d

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.0-cp38-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.0-cp38-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1f9c8ed4d442057607488c8e4f259955377a1c666f2e80c325d0944b2e62023d
MD5 ab465363172bcf36866b6c128dc3987e
BLAKE2b-256 6512cc277f4850aea44ef0a4b6f4d356268970917bbd71f0311c02fcb2b11bf9

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