Skip to main content

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)

Release files for rfernet 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rfernet 0.3.5
File Size Uploaded
rfernet-0.3.5.tar.gz 6.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for rfernet 0.3.5
File
rfernet-0.3.5-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
rfernet-0.3.5-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
rfernet-0.3.5-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details
rfernet-0.3.5-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
rfernet-0.3.5-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
rfernet-0.3.5-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
rfernet-0.3.5-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details
rfernet-0.3.5-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
rfernet-0.3.5-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
rfernet-0.3.5-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
rfernet-0.3.5-cp311-cp311-manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64 Details
rfernet-0.3.5-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
rfernet-0.3.5-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
rfernet-0.3.5-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details
rfernet-0.3.5-cp310-cp310-manylinux_2_28_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ ARM64 Details
rfernet-0.3.5-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
rfernet-0.3.5-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
rfernet-0.3.5-cp39-cp39-manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ x86-64 Details
rfernet-0.3.5-cp39-cp39-manylinux_2_28_aarch64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ ARM64 Details
rfernet-0.3.5-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details

Total release size: 30.4 MB

Release files / rfernet-0.3.5.tar.gz

Download URL rfernet-0.3.5.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
07e98fc5d2a5ae6af4b529f113197c5f0c7bce7f03fdbd4d4f764ab27ac949f6
BLAKE2b-256 checksum
How to use checksums
da29109469a60a4724a7014f7b95b72b5cb82556a9660b86e5a2b00de9e80eb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release files / rfernet-0.3.5-cp313-cp313-win_amd64.whl

Download URL rfernet-0.3.5-cp313-cp313-win_amd64.whl
Size 2.1 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
b230d8167679c4c576086892f8ad71b4d30cddb011dd74572c9a213903d94e7a
BLAKE2b-256 checksum
How to use checksums
f315ab2f5e1411cf9c03cc51229d23ee61e687d7c1effba95dba70c1df819411
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / rfernet-0.3.5-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL rfernet-0.3.5-cp313-cp313-manylinux_2_28_x86_64.whl
Size 1.9 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c487bc3b81fcb18c3f281808ea23dcb1bbc430911f693dd9284bde6f52cd2d43
BLAKE2b-256 checksum
How to use checksums
470384035d440617be512b39fc8674482c2ac51d4dbc292b04672909aeced404
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.6

Release files / rfernet-0.3.5-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL rfernet-0.3.5-cp313-cp313-manylinux_2_28_aarch64.whl
Size 1.8 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
57ac9481353d1f19d3433369ebde53cab1f7ff4928b891dae13fb44c64a11d20
BLAKE2b-256 checksum
How to use checksums
893a0e6f9ee749a662e62cc20bff7e54b58e4f65fb924a1d39df43792aebaa23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.6

Release files / rfernet-0.3.5-cp313-cp313-macosx_11_0_arm64.whl

Download URL rfernet-0.3.5-cp313-cp313-macosx_11_0_arm64.whl
Size 212.1 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1a11ae44a8bf52a6c654ae4c83c0f87b3edaaf38484303bc753994f0d9bbaf08
BLAKE2b-256 checksum
How to use checksums
c7b5032e439b9a96cd8e7472e8b68f727bcaa01df5e8ef446cea73210b8e4589
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / rfernet-0.3.5-cp312-cp312-win_amd64.whl

Download URL rfernet-0.3.5-cp312-cp312-win_amd64.whl
Size 2.1 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
ed5aecc89ea4dc255619954113a510b2ef67956cfab9c4f1f5ed558d9e8539fa
BLAKE2b-256 checksum
How to use checksums
977ee20fa5f8ee38d0e453e39fd4deef79ffc1e7865ebee3829368d09009ce87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / rfernet-0.3.5-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL rfernet-0.3.5-cp312-cp312-manylinux_2_28_x86_64.whl
Size 1.9 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8b11cc5dc00d45230cdb8a10021da4bb2bca787a1af3e8e18d7c9ab016ca592b
BLAKE2b-256 checksum
How to use checksums
bc4eb62d235aff82eef3523af5510cc99db76e080330217410117eaf792afe00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / rfernet-0.3.5-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL rfernet-0.3.5-cp312-cp312-manylinux_2_28_aarch64.whl
Size 1.8 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
bbd0d4bbd43707ede2474a42c1aeb7172b7d0f24c0751dc435cea1406d889d21
BLAKE2b-256 checksum
How to use checksums
c455521277903015ab38a200a450e1a383308d245f83a446f929f454697ff70e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / rfernet-0.3.5-cp312-cp312-macosx_11_0_arm64.whl

Download URL rfernet-0.3.5-cp312-cp312-macosx_11_0_arm64.whl
Size 211.8 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1fad62b0a16d83c6662cb8ac56fdd573172dc393b1ee45a5c391c5ed20df7a34
BLAKE2b-256 checksum
How to use checksums
723d58e5c3ea9c3a6fa071725d936837e7d21dbdf03bc1a1fc36aba591880aef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release files / rfernet-0.3.5-cp311-cp311-win_amd64.whl

Download URL rfernet-0.3.5-cp311-cp311-win_amd64.whl
Size 2.1 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
d2b967010b13cd782935845a26db3f01b9d12d2ab587f80b397c6ebc292cbe85
BLAKE2b-256 checksum
How to use checksums
2531c1cbc580fd7253c12b44553c0307e17e9159ba1edc8a2fc1809c56cddeed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / rfernet-0.3.5-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL rfernet-0.3.5-cp311-cp311-manylinux_2_28_x86_64.whl
Size 1.9 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8ff4a0b307416ee5b01019a6204b27cbebd01598dcc473d8bedc9a3a189c0abb
BLAKE2b-256 checksum
How to use checksums
dbd12ec9c7e927d29eb2458bf4de224d269fbc13c073a955a7b87342c0dd09a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / rfernet-0.3.5-cp311-cp311-manylinux_2_28_aarch64.whl

Download URL rfernet-0.3.5-cp311-cp311-manylinux_2_28_aarch64.whl
Size 1.8 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
6678990086a2355894a399f51ae09d52afae712852eea76db5fc7928ece9c529
BLAKE2b-256 checksum
How to use checksums
16362ae954d3cd8cc916154a91c9b5b59348762b2b04cf4ca544ff3dacba659a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / rfernet-0.3.5-cp311-cp311-macosx_11_0_arm64.whl

Download URL rfernet-0.3.5-cp311-cp311-macosx_11_0_arm64.whl
Size 214.1 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
71a33c229ac8a55c5645e0e37a6914203141df682f5d7040cc4d66ff1ae707fb
BLAKE2b-256 checksum
How to use checksums
db19d99d0a25cc125e96d1f754791d01b6cf767377814cadbed340c0c38d42ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / rfernet-0.3.5-cp310-cp310-win_amd64.whl

Download URL rfernet-0.3.5-cp310-cp310-win_amd64.whl
Size 2.1 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
1d1f84b6d0719a28a895e9f78ee56fd73cc15b0ea7c73684f571170e2de2d3cf
BLAKE2b-256 checksum
How to use checksums
e62e08e15960964403c67b768c279298df2e0ca6afa60f74d72dc5bc28eb54ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / rfernet-0.3.5-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL rfernet-0.3.5-cp310-cp310-manylinux_2_28_x86_64.whl
Size 1.9 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a2df32cc93f7f405564f0fd5e9456f33b91562c04e802c08b9b8e488bb864ecf
BLAKE2b-256 checksum
How to use checksums
f83d1f76113b7eacc21ae226381a3f4344183a5fd81b1d1fe4c6ef79524b6b16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.18

Release files / rfernet-0.3.5-cp310-cp310-manylinux_2_28_aarch64.whl

Download URL rfernet-0.3.5-cp310-cp310-manylinux_2_28_aarch64.whl
Size 1.8 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
1780fa5049a2d7f227baed8bf04a34a2cbb2e324e96c9812b2adadf437485d80
BLAKE2b-256 checksum
How to use checksums
77e9471074c2bcdb82b782d3c0ce591cae428ad348a63ce6d8ee92a29c8da9fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.18

Release files / rfernet-0.3.5-cp310-cp310-macosx_11_0_arm64.whl

Download URL rfernet-0.3.5-cp310-cp310-macosx_11_0_arm64.whl
Size 214.7 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1051ce3f1746a45033d4e0773796ecd28007c2af82b95e63cbd8a426600d59e4
BLAKE2b-256 checksum
How to use checksums
8df582db9c9eff341f54bc415341f92790ce090cb7b94c34d416ded07b59fbe6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.11

Release files / rfernet-0.3.5-cp39-cp39-win_amd64.whl

Download URL rfernet-0.3.5-cp39-cp39-win_amd64.whl
Size 2.1 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
44d2a9284c24559b784d5891461202b0cad2a1b33040cb598554e25c5584f977
BLAKE2b-256 checksum
How to use checksums
18eb62697d6052ebf1ab4830d6d9cf4d7177961a023862feffa15f5b306429e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / rfernet-0.3.5-cp39-cp39-manylinux_2_28_x86_64.whl

Download URL rfernet-0.3.5-cp39-cp39-manylinux_2_28_x86_64.whl
Size 1.9 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f0e50dd2cd80d281fdd994f47298c44092b7f1621fb8664e0127b082f0b81aa1
BLAKE2b-256 checksum
How to use checksums
90b7373c9d83adc7633ba6724eb34a4f937c6597363848c9185f9cffa9f5ab39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release files / rfernet-0.3.5-cp39-cp39-manylinux_2_28_aarch64.whl

Download URL rfernet-0.3.5-cp39-cp39-manylinux_2_28_aarch64.whl
Size 1.8 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
4ba3e8896601fb9f108824da3878488bd8cffc98a120eb6e0407fd56bb1358a5
BLAKE2b-256 checksum
How to use checksums
50e085dae66331a3a3eba32dda8baf12c7360a82676c4e6b4c9aa04a9cc84288
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release files / rfernet-0.3.5-cp39-cp39-macosx_11_0_arm64.whl

Download URL rfernet-0.3.5-cp39-cp39-macosx_11_0_arm64.whl
Size 214.8 kB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ee6ef424cf611bb9ad9f3a4f2ac61831fc80b1d8eb3aeefe3aff0725a665ff7e
BLAKE2b-256 checksum
How to use checksums
08145cf2bd90bba3bf629f870c5a0d43a7cf4bff83512bded5d7b91f178d920c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.3.5 This release

21 release files

0.3.4

16 release files

0.3.3

6 release files

0.3.1

11 release files

0.3.0

11 release files

0.1.3

7 release files

0.1.1

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page