Skip to main content

Python wrapper around the libsrtp library

Project description

License Version Python versions Tests Coverage Documentation

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

Uploaded Source

Built Distributions

pylibsrtp-0.10.0-pp310-pypy310_pp73-win_amd64.whl (1.4 MB view details)

Uploaded PyPy Windows x86-64

pylibsrtp-0.10.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pylibsrtp-0.10.0-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl (2.0 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ i686

pylibsrtp-0.10.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.4 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

pylibsrtp-0.10.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded PyPy macOS 10.9+ x86-64

pylibsrtp-0.10.0-pp39-pypy39_pp73-win_amd64.whl (1.4 MB view details)

Uploaded PyPy Windows x86-64

pylibsrtp-0.10.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pylibsrtp-0.10.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl (2.0 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ i686

pylibsrtp-0.10.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.4 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

pylibsrtp-0.10.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded PyPy macOS 10.9+ x86-64

pylibsrtp-0.10.0-pp38-pypy38_pp73-win_amd64.whl (1.4 MB view details)

Uploaded PyPy Windows x86-64

pylibsrtp-0.10.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pylibsrtp-0.10.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl (2.0 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ i686

pylibsrtp-0.10.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.4 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

pylibsrtp-0.10.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded PyPy macOS 10.9+ x86-64

pylibsrtp-0.10.0-cp38-abi3-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.8+ Windows x86-64

pylibsrtp-0.10.0-cp38-abi3-win32.whl (1.1 MB view details)

Uploaded CPython 3.8+ Windows x86

pylibsrtp-0.10.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

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

pylibsrtp-0.10.0-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (2.1 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ i686

pylibsrtp-0.10.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.5 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ ARM64

pylibsrtp-0.10.0-cp38-abi3-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

pylibsrtp-0.10.0-cp38-abi3-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8+ macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pylibsrtp-0.10.0.tar.gz
Algorithm Hash digest
SHA256 d8001912d7f51bd05b4ea3551747930631777fd37892cf3bfe0e541a742e699f
MD5 2b01813205f2a67784f2453cf3decefd
BLAKE2b-256 6baec95199144eed954976223bdce3f94564eb6c43567111aff8048a26a429bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-pp310-pypy310_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 4033481f332331bf14b9705dca69efd09d3809ba4a2ff69914c53dddf39c20c1
MD5 c3a2bfb59b850cbf2fc6606a1d05d9d3
BLAKE2b-256 2c46e92f8a8d7cb5c1d68ec85254a8535aad922efa15646c7ba0c7746b42c4ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 511158499309c3f7e97e1ebeffbf3dd939e641ea553de43cfc02d3576aad5c15
MD5 ba8281b11ab5a8126e320e9f67f74044
BLAKE2b-256 d83890c897fc2f2929290ada1032fa3e0bd39eca9190503250f6724a7bc22b5b

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.10.0-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 eda06947ab42fd3737f01a7b98537a5d5908434d37c70488d10e7bd2ff0d520c
MD5 94da49da1c415ec8bc2454e013d3424f
BLAKE2b-256 b19fc611fc47ef5d84dfffca0292bcfb2d78ee5fc1a98d50cf22dfcda3eee171

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 70111eeb87e5d3ffb9623e1ea036329dc81fed1282aa93c1f32377862ca0a0d8
MD5 7bba4d964ede360c90acdb7968c862b2
BLAKE2b-256 16e83846ac56ae4a2de91e9b3e67dff5363b2b07148616d283416fd8dd8c6ca6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 582e9771be7ffd060faea215cb4248afdad1356da473df1b8f35c7e382ca3871
MD5 15cfa5c75f815cf41e1adbb55da03c51
BLAKE2b-256 66b530b57cac6adf93dfee20cceba6cd91e216c81b723df2bc9dcfe781456263

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-pp39-pypy39_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 e4d9625a9667d2c0843bf9cfa731f815d8b9a04ed9ffe5b98442483b8b236f13
MD5 2564a91861b690b5442d0fdeb9d7f5e1
BLAKE2b-256 9ec1c8d2be418b63b1651219b8cc733a775657844afeb7ffd0012258e04c0307

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f33dced976a0039b4873d2468fb864795df0b79cdecf9b9a4286fe76099dfb1b
MD5 9db380790b98785134777f5e287f0047
BLAKE2b-256 f90fca0f47f96c5a540148324a015eb382dfb84b95562b6ae8bb216864309ea1

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.10.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 5e519f9f73cd89404db9008bf7e628f8be4957000f61cee2841b62fcffe267c5
MD5 e3b53df5c36b0ecd694651f83e10cd1c
BLAKE2b-256 18ab5bb02ac9e8f4b3323e472735cd954ebf9788dcb1e7576544431e3b019cb9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 95a31a776d993cdc486a6435268a6facac8c92cff560b0b53ccc3a1fd4714f6a
MD5 87d5e68d97dbf65afd213fe6d529f571
BLAKE2b-256 72b291d143f1ea55b95811c4e7385a706ec74748068a9f9702adaeef397456a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ba342e60035dcdbb04368c95cea7ed2c9639ea34efb68db42cde3cfd6c489e71
MD5 411e5c359db1aa2a444feb678cf5b562
BLAKE2b-256 86c40789dfe34aad121eaf1dbf763d2c093e3cd29c1dc76e6a68bb23be7753e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-pp38-pypy38_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 fea95747ce124f7a476fb71e0929d122ce6ddf35ae7d6f4eb372707a078c4b40
MD5 05a3a75ffcae7ca901aea977032b1694
BLAKE2b-256 247fca581c7900a9229783e8d39ddcdec0dae7189d30a6a70472505afdc67573

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ca0e351c15d2d085665a1103d967fc90c9074d4ba60a0b3ed529ef075fd6e9e
MD5 34c8447e06dbff7495ed8e5b96f2795c
BLAKE2b-256 f5e66fa59a41b6183b320bbd9a01912d0ad669c180d033729af03658d92d6dbd

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.10.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 f5f971f1f9e4849c5ce38671628b3d1558763941cb4b54a74497026e82b5f68a
MD5 f2e5d0a6bbe6c5adbebb9e081e086f99
BLAKE2b-256 3d743bbb6a270b45d4c8f60b6d1e480376327011a0aa491d82f7fb37907ab53b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e2115f91e39cf3718591fac3202df76d606441cabc9057e4a1b97b7e7a3328d9
MD5 4bd28cf41de87fd5c48baa3c1c0a299d
BLAKE2b-256 9355b84bb10861c1818c0a403c45b68e8c67cf32c824f995c0c8eff38a1f53b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1990afa3b1acc2ded0bcb015e38d28eb707af32b4bb0a08ba4bc187148f36a9e
MD5 bd8e13abf7a4581880c6b22eeaa01673
BLAKE2b-256 edcb5f3f7b7370b052bc67735162942be67ee9ee32220051251505b4f7cd4de1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 cd965d4b0e9a77b362526cab119f4d9ce39b83f1f20f46c6af8e694b86fa19a7
MD5 d8aeae02ad9f502648e034236ac85849
BLAKE2b-256 4c3185a58625edc0b6967fe0904c9d89d019bcece3f3e3bf775b9151a8cf9d0d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylibsrtp-0.10.0-cp38-abi3-win32.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.8+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for pylibsrtp-0.10.0-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 8c6fe2576b2ab13942b47db6c2ffe71f5eb1edc1dc3bdd7283169fecd5249e74
MD5 1a03d0c636cc4e774411042293dea680
BLAKE2b-256 00f6c76fa5401f9d95c14db70de0cf4fad922ad61686843bc3e7411178a64bc8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1b2ef1c32d1145239dd0fe7b7fbe083334d345df6b4597fc66faf914a32682d9
MD5 3c81faeceb93c43945041098fdf05b25
BLAKE2b-256 16789ea0c88490ad4fe9683ddf3bbee702c7a2331e83a333bb3aa52e8d7d909b

See more details on using hashes here.

File details

Details for the file pylibsrtp-0.10.0-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 f13aa945e1dcf8c138bf3d4a6e34056c4c2f69bf9934bc53b320ef14c7317ccc
MD5 c66158f8152d4fc6a90a292cac2c8406
BLAKE2b-256 abe6b0a30e79aa2312834b33f5e9c0ad459fc94e195c610634ee9665fafb1fc8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bb7640b524544603d07bd4373b04c9582c8cfe41d9789d3f492081f053bed9c1
MD5 bc66eb576cdb0f78e7fb27ec708ff290
BLAKE2b-256 21ab9b2b5ad2ceaa1660de16e0a2e3c54a2043a9c4a3eef7718930c78dc84e77

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ca1994e73c6857b0a695fdde94cc5ac846c1b0d5d8766255a1dc2db40857f667
MD5 cefa63fd66acae06f311010cbf111e47
BLAKE2b-256 663edb86a09a5cb290a274f76ce25f4fae3a7e3c4a4dbc64baf7e2aaa57a32bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylibsrtp-0.10.0-cp38-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6a1121ceea3339e0a84842a4a9da0fcf57cc8f99eb60dbf31a46d978b4170e7c
MD5 4a46565c71909c020a8b09e8a8f4adf3
BLAKE2b-256 1cd2ffc24f80e83a54d9b309cdae6b31cf9294b4f3a85ab107827fd272d1e687

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