rfernet
Python extension for Fernet encryption/decryption, faster than other alternatives.
This library uses the rust library fernet-rs https://github.com/mozilla-services/fernet-rs.
CI & Building wheels copied from cryptography and orjson
Benchmark
Compared to cryptography's Fernet (CPU):
In [2]: from cryptography.fernet import Fernet as cFernet
In [3]: from rfernet import Fernet as rFernet
In [4]:
In [4]: plain = b"asd" * 1000
In [5]: key = rFernet.generate_new_key()
In [7]: r_fernet = rFernet(key)
In [8]: c_fernet = cFernet(key)
In [9]: %timeit r_fernet.encrypt(plain)
18.4 µs ± 117 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
In [10]: %timeit c_fernet.encrypt(plain)
77.7 µs ± 921 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)
Memory:
# rfernet
[ Top 10 ]
<frozen importlib._bootstrap>:219: size=4444 B, count=38, average=117 B
test2.py:4: size=576 B, count=1, average=576 B
<frozen importlib._bootstrap_external>:59: size=156 B, count=1, average=156 B
test2.py:6: size=93 B, count=1, average=93 B
<frozen importlib._bootstrap>:371: size=80 B, count=1, average=80 B
<frozen importlib._bootstrap>:105: size=72 B, count=1, average=72 B
<frozen importlib._bootstrap_external>:1352: size=56 B, count=1, average=56 B
<frozen importlib._bootstrap_external>:606: size=56 B, count=1, average=56 B
test2.py:7: size=48 B, count=1, average=48 B
<frozen importlib._bootstrap_external>:1030: size=40 B, count=1, average=40 B
# cryptography's Fernet
[ Top 10 ]
<frozen importlib._bootstrap_external>:525: size=3134 KiB, count=31814, average=101 B
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py:91: size=449 KiB, count=3169, average=145 B
<frozen importlib._bootstrap>:219: size=404 KiB, count=3384, average=122 B
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/abc.py:126: size=146 KiB, count=717, average=209 B
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py:89: size=119 KiB, count=1773, average=69 B
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/abc.py:127: size=68.7 KiB, count=447, average=157 B
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/inspect.py:2793: size=46.8 KiB, count=282, average=170 B
<frozen importlib._bootstrap_external>:59: size=41.7 KiB, count=265, average=161 B
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/abc.py:135: size=40.8 KiB, count=339, average=123 B
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/idna/idnadata.py:826: size=36.7 KiB, count=3, average=12.2 KiB
Memory test source code:
import tracemalloc
tracemalloc.start()
from cryptography.fernet import Fernet as cFernet
plain = b"asd" * 1000
key = cFernet.generate_key()
c_fernet = cFernet(key)
c_fernet.encrypt(plain)
snapshot = tracemalloc.take_snapshot()
top_stats = snapshot.statistics('lineno')
print("[ Top 10 ]")
for stat in top_stats[:10]:
print(stat)
Metadata
Release files for rfernet 0.3.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rfernet-0.3.6.tar.gz | 5.7 kB | Without provenance | Details for rfernet-0.3.6.tar.gz |
Built distributions (wheels)
Total release size: 31.5 MB
Release files / rfernet-0.3.6.tar.gz
| Download URL | rfernet-0.3.6.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
414c00d0bb69c2f5d18c1d812b12ccc7e717eb73aa6cf5e4d477be7114d067f8
|
|
BLAKE2b-256 checksum How to use checksums |
d9c63e661182690eb4ceffe11e7306315a939016409597952d9bb3366ec9db0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / rfernet-0.3.6-cp315-cp315-win_amd64.whl
| Download URL | rfernet-0.3.6-cp315-cp315-win_amd64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.15 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
06a75ee5c56765adf50da6adbfd4d157a7faaf7ed361bcae2cebde980e615f55
|
|
BLAKE2b-256 checksum How to use checksums |
bff1e70237929f22a97f50d473e9c911987191f3f5cc9bffe9889f105d8b07ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0rc3
|
Release files / rfernet-0.3.6-cp315-cp315-manylinux_2_28_x86_64.whl
| Download URL | rfernet-0.3.6-cp315-cp315-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.15 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
2d57f19b4da093d744a7441d6d273af2bbe64999584aec95acd1671405f8518b
|
|
BLAKE2b-256 checksum How to use checksums |
844fd8321ea4e8e3b1c1d96066d102ea7815e4e3aa348f6d9d61f9245a1d0cfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0rc3
|
Release files / rfernet-0.3.6-cp315-cp315-manylinux_2_28_aarch64.whl
| Download URL | rfernet-0.3.6-cp315-cp315-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.15 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
5a04362230c366af4617d0726d893448dfb4aa81ba0a170f2fa8e55471abdfad
|
|
BLAKE2b-256 checksum How to use checksums |
0a85d329e550dc50284a6e59afb737979085d6b7524dd2fc4297b9ac940b8c37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0rc3
|
Release files / rfernet-0.3.6-cp315-cp315-macosx_11_0_arm64.whl
| Download URL | rfernet-0.3.6-cp315-cp315-macosx_11_0_arm64.whl |
|---|---|
| Size | 221.8 kB |
| Tags | CPython 3.15 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5720f672f24e6578624c44ed1e736454b6579af4d83601db01b50f2fad5e1a1b
|
|
BLAKE2b-256 checksum How to use checksums |
45e5ff71508922a64a5bf0bdffe3e8c0977e9fd9d4a54a56d279c1217e913734
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0rc3
|
Release files / rfernet-0.3.6-cp314-cp314-win_amd64.whl
| Download URL | rfernet-0.3.6-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b5ae2a66217106689cea802f70cdef6d388c2880ec0409a5068aebae97e62b67
|
|
BLAKE2b-256 checksum How to use checksums |
cc8a4ee772091b0a011a14007d6efdafae9aae16603a9d431fea2e6df0012099
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0rc3
|
Release files / rfernet-0.3.6-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | rfernet-0.3.6-cp314-cp314-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b6f61472c38f7206ac48bcbbb56161e5ce61686d3ce822da02ce6c67d82d43ff
|
|
BLAKE2b-256 checksum How to use checksums |
5232c75f2cc947e6968673e0ac6bcb1f33d46eff9038a088dcaa218c84367bc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / rfernet-0.3.6-cp314-cp314-manylinux_2_28_aarch64.whl
| Download URL | rfernet-0.3.6-cp314-cp314-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
4f71b75cfc6d31072ee9993fa4a5a0a5dc1df6b1a3551b6ffab08f0885c24f97
|
|
BLAKE2b-256 checksum How to use checksums |
baefc2dee57b280b3a98e25d07f7f6024a4b4a257b3675f1cfeaffad66f1bfa8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / rfernet-0.3.6-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | rfernet-0.3.6-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 221.6 kB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
907bee6d7213c1ebb4e606281287e14a1dbf14ef9dacd97090cdb8b415c1402d
|
|
BLAKE2b-256 checksum How to use checksums |
0cc92d426b21bc773042a2c4c6bb91a309d3e2a52f5e7ea02591646c85c66844
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / rfernet-0.3.6-cp313-cp313-win_amd64.whl
| Download URL | rfernet-0.3.6-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7a635e1061fda57e51c1fc6b60e4f09706bd94f6929bd6056b0b8355e5f81ebd
|
|
BLAKE2b-256 checksum How to use checksums |
4f8eef642c62b69976355930e0ef3bf22105078f24314b68de2ec32a47a9c40e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0rc3
|
Release files / rfernet-0.3.6-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | rfernet-0.3.6-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
587a39c31a7537255ce47f17daad9961f7eb97781627de560886dd0b0be87aae
|
|
BLAKE2b-256 checksum How to use checksums |
2d948c4b5f51676691a680b40be896ba2eb1d99ff0a3395dc8d314889662fa8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / rfernet-0.3.6-cp313-cp313-manylinux_2_28_aarch64.whl
| Download URL | rfernet-0.3.6-cp313-cp313-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
e992302d782cf8e615e82b1babd6cd2598b19199168e1a7503846ec5770f1282
|
|
BLAKE2b-256 checksum How to use checksums |
9bf8ae3d41647c1470e60a50f73e99b0102101d279c0bdabb5b0f0b5ed2ab5b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / rfernet-0.3.6-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | rfernet-0.3.6-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 220.8 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d67b40594830d5ce511d72ee9ef8ff9d2bb8ab8f1998c7704bd478187ed0a5c4
|
|
BLAKE2b-256 checksum How to use checksums |
ae37a830c1d64e2c07e0926d5fd88552919676c62e36b74a5f0fb4849501a921
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / rfernet-0.3.6-cp312-cp312-win_amd64.whl
| Download URL | rfernet-0.3.6-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3313a9840975986ff9dd07f3b78ebb8fb059ee05eec7b6532992ab4305d2a877
|
|
BLAKE2b-256 checksum How to use checksums |
3f223c6f703b7a830e9dd37e90f293bdc3a350c31225e61a0e232f6ac158b694
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0rc3
|
Release files / rfernet-0.3.6-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | rfernet-0.3.6-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
be3a78b771239cfad5a3ce7f57a227b3f0f1edc659ece65c2ffb9ec7da6d05ed
|
|
BLAKE2b-256 checksum How to use checksums |
2500caf325b0f70a93d1342c71d406d9d6749b7dcb9f86cddfa928e7a4e15ebd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / rfernet-0.3.6-cp312-cp312-manylinux_2_28_aarch64.whl
| Download URL | rfernet-0.3.6-cp312-cp312-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
6951fc742d7e1976f9f97354c0d4e275610298eeae40b6b252315d74d12f2994
|
|
BLAKE2b-256 checksum How to use checksums |
55815e7ad53552ab74bad323e0d9a869d18dfcba8f3ff145b769c3f32e403b3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / rfernet-0.3.6-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | rfernet-0.3.6-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 220.0 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2081e78da47df98bfe040e5e9a2aa873298b86a7e4767cac4f1c25fa49ead756
|
|
BLAKE2b-256 checksum How to use checksums |
bfe81069dd8b36da4d3058168dfd7099587cc5162d76ad79ed6db9097f91aff2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / rfernet-0.3.6-cp311-cp311-win_amd64.whl
| Download URL | rfernet-0.3.6-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1c90dc167e636ee6e71c21e2fad6052a308c82e6ea543f96feca9148eba32b3a
|
|
BLAKE2b-256 checksum How to use checksums |
8aafe3f4db3dfd50ad39c9123d60c76b1887668bc06b1c59d025a634a4718a56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0rc3
|
Release files / rfernet-0.3.6-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | rfernet-0.3.6-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
56703790e76fcad0044b9031642c405266ff811fafaa8bc4affce11f65ca0a0c
|
|
BLAKE2b-256 checksum How to use checksums |
6bf1c25629443950036f8084a14b62e35ce80c74b168106c42e76b880f8e05ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / rfernet-0.3.6-cp311-cp311-manylinux_2_28_aarch64.whl
| Download URL | rfernet-0.3.6-cp311-cp311-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
0ab27d52794cb9e3ff028294cf7cc97728debc6b8232b01c613ce67ddcd5daaa
|
|
BLAKE2b-256 checksum How to use checksums |
46f5f5bb889061aff13d11e483d69251519962bcfd1d5b4e9b1297f2a647c31e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / rfernet-0.3.6-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | rfernet-0.3.6-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 224.7 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5e0279eef9738c341523fb3b0a5ceb2737b12745c679ef714595e4be810eeda4
|
|
BLAKE2b-256 checksum How to use checksums |
7da5d32b832a737435dcfe13a2dabcc47fc0d73c849f8382eb142d1f26becc89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for rfernet 0.3.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.