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

Uploaded Source

Built Distributions

pylibsrtp-0.9.1-pp310-pypy310_pp73-win_amd64.whl (46.2 kB view details)

Uploaded PyPy Windows x86-64

pylibsrtp-0.9.1-pp310-pypy310_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.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (53.5 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

pylibsrtp-0.9.1-pp310-pypy310_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.1-pp310-pypy310_pp73-macosx_10_9_x86_64.whl (47.3 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

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

Uploaded PyPy Windows x86-64

pylibsrtp-0.9.1-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.1-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.1-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.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl (47.3 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

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

Uploaded PyPy Windows x86-64

pylibsrtp-0.9.1-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.1-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.1-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.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl (47.3 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

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

Uploaded CPython 3.8+ Windows x86-64

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

Uploaded CPython 3.8+ Windows x86

pylibsrtp-0.9.1-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.1-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.1-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.1-cp38-abi3-macosx_11_0_arm64.whl (52.9 kB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

pylibsrtp-0.9.1-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.1.tar.gz.

File metadata

  • Download URL: pylibsrtp-0.9.1.tar.gz
  • Upload date:
  • Size: 11.7 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.1.tar.gz
Algorithm Hash digest
SHA256 3a51d7a18aa2338e10f54c1bd03e94fd760fabb69c2f5bf1dc590305b7ec2402
MD5 04dfa09cf61103a2f094823bbabcaf87
BLAKE2b-256 8fcbc859d4c7649681aab30d03e75b0450cd568afea939166b36f8233dcb3509

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.1-pp310-pypy310_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-pp310-pypy310_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 83d240572bfb35de7c93dc024722556b62b35d89813f40d4a9f7d0f3bf84554e
MD5 23766d0ce6d51c01de5fdc4a0942cbec
BLAKE2b-256 39acfef6120e9b5713bc9e5d0d24b0ba379f95bd50f58addbe71c6cf265fa02a

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6b1cffede6a3e90c19bbbe44a2ca5eee857de1483eb749cd532e0208bf53be6f
MD5 cd52d90d1c12d9c0df0f9767e9326e6d
BLAKE2b-256 98e91f4203cd02bbb819da6fe435bd8f70c4ffad82caa7701f22921bc2d12c15

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 11e84d0eb0c912b737202bcbe4c406105d488c61553479a3a66eeef130ff92e0
MD5 b0d1404d6c143f23e778c56f633ed7c5
BLAKE2b-256 988d5b3bcb24adaafb8d861a548e8585ae34088684ed54e5699f834a10663a96

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.1-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 c8f866e5564ea714dec283cd0064d4770eb3099ca993eea211a6b6d34f98aeb1
MD5 de00056c59a9dc63071bc1c4fef51a00
BLAKE2b-256 233c219a4a71326b0df03075619087cfcfd631237a0aa0f99d8fbedbe3f42fa8

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.1-pp310-pypy310_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-pp310-pypy310_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d5ae5225d6555cc7e1fc3d80c4c802d938080259c0cabacc88572ddacb143512
MD5 555613d46c98fd236f9e4c932ef19178
BLAKE2b-256 5a2dfb313e098d083171de6723f06eb334ef73c3d976b383a89d882ee2f385f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-pp39-pypy39_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 ccc5147887bf9eec58fc8c54e1fe200a3041b61143024a7b38389d932ee7ebd2
MD5 4274b08dc0b14f3f2168afecf8d06a1e
BLAKE2b-256 e1184660df14a7acf2fdef155a25d87cdde5f2d7e52c62ed8334f2cbb4c8b445

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9550f2b0313a7efb34762b6df444a75f1021ac8e0b824448173eafb7537018bd
MD5 1a9672db864728764b8ab1b90cad52b3
BLAKE2b-256 daaa4ec66cb4876532a8118a8f8014eddd99692354ed42fe0b68eb4fe5215e77

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 41ffbe0cdcba5014bdbd080abccdc79066d2860a499791dd9f049ab6aec6a3ec
MD5 39481edb3fb2bf806d39a81d7323c211
BLAKE2b-256 553d8b2b4a1ca947dec14bbe8355832f06c607af6bcb30e42664ce8b4eb53b69

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.1-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.1-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 215bcd54f9072be8a8985bdb60bdd432bf63173ce4cc5bd417209724524b4d53
MD5 ff773e639bc7094bdeb525481495cf4a
BLAKE2b-256 fcf2c8c1ad5da28d01baee68805f191a08c783643897c21a563b9c88318f3f42

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1f51c91b89a692784fea909d8e3a64222ad5145d056d21fdaec92112efaa6c60
MD5 e08958175a4733d0c65b0067b11df45e
BLAKE2b-256 a3c44611229a0cc9f0a13a99a1fe3f8e0a4f377b9f186c18b68ec0782ea4be5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-pp38-pypy38_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 4927b4672041c0200d5ccb69d9a6f9934b340b7035b6e2ddd9c5e0069b22e9f8
MD5 0c6438936f02377f0cce8b62009ef518
BLAKE2b-256 7d552a60b58c74c65e29e76f5a336911ae1ccf39701202c34d236786b5defaa0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4d3a736189dc08ef2e6abdde2e7a94cc52c23b88030956023b4b92a946eccb57
MD5 0a47d4a925bda391579e96c9268c2015
BLAKE2b-256 27321e5db17700cf390639b9ba2dec55374f03684a0518b57acaf8cfc38ac08e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 58f7a0bdfdc40d4fa95446b639e683e969d56a53b3255eae1ea3cdb785cc396d
MD5 76a0cca6232d6169fdef6310daef8488
BLAKE2b-256 586ef2407ae39a4e0364066b84af7416fae356d4ca3b83cc589698b1e3fd4029

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.9.1-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.1-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 94b3dd175c9c1177f420cfabdbd425dc76499855d9defd1b33591d0f50465acf
MD5 5a3ebc4af5bcee87ac3c977dc05c8d7a
BLAKE2b-256 2c83036b7e4a1f52a28f072243901aaef961aff8e38db7cd06b1146689838705

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9ee457fc74eb75ba78c5144e94ab8aa0be8447d74ab8b95d802c2c34f07a787b
MD5 0d9ab71e0175863e241960cb58e2b22e
BLAKE2b-256 645a46477ff8b4fcee4102d7b0a7e3a241627324303780c413db210004c3c9d1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.9.1-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.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4034d8eee4b0d6df018585717329698591492d0762055478dc46169516639f78
MD5 4312fa01d00ca7cbd51a16e4adfca525
BLAKE2b-256 55c4f72f8409795598c71e7ce38f757a2755984d85276e08de2b7fc9630dc70d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.9.1-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.1-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 7f5bbd06b823e412deeacd617f09fbdcff484f9dd0d85fd377acb674b35b903f
MD5 e8b7a399cbaba416705bb685f556d366
BLAKE2b-256 4b2c880340c1c9ee9eacaeedd66c58cd26a55f67ba730c6d008151177c02c0b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4ebf704c1e9d827d63cfde4999cdb954247ddf97e47b8f768c1ea47cc20ec51c
MD5 33bd69d86cfbc7e7d70bef6ccd3ced80
BLAKE2b-256 91eb277199f587962b0c2ce3f4d4e0ab8c3c85e7c4ca1963b955ae582296e46a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5d7da7d6c9f420ef4cf44044ac0543a2584704ee13a48c6169abba2b27624b51
MD5 ea11e6abbc429c0e1f199908ff327bc2
BLAKE2b-256 22f44fca0e1c6f3957f68844a3e6ecaf1fa01ad11599e7ab4f7ef9673253ce9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 54da85cff840b0b7dfb6ee7f62bc90741e489dae2b4cc524dbf6702a91ccd2ad
MD5 59be4c61ff172e715c56bd6754f085fe
BLAKE2b-256 242d641718191a44d2e0dca3d69e0cfdd8b07b273a4b6bfbe463212af3433066

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5e9e4ee8f82cca3d6a5d79da653ce727cb3c3a65ad1837aaa0a8c2c8bc10e763
MD5 6cc104de7c42dafc6321e885d975d3c5
BLAKE2b-256 564f2e00622c042750b11ce79449458c388cdf72350ec5d6a1824eacbd71897c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.9.1-cp38-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ed9e4babf175f5d3eb3814ea4c4481fff31156050697ca771b292e93da5ff666
MD5 a989d26113f64e2661858037f636c6ce
BLAKE2b-256 fb59d46e0e2c48f4a210c624e65204d95f2c29f392b5cd2caaff17f02fb97368

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