LibFcrypt
Simple, symmetric encryption. Courtesy of cryptography and Fernet.
Functions
Base
base.gen_key(): Generate a bytes object key.base.passwd_gen_key(passwd): Generate a bytes object key derived from a string.base.encrypts(key,string): Encrypt a string using a key (bytes), returns a bytes object.base.decrypts(key,string): Decrypt a string using a key (bytes), returns a string.
File
file.encryptf(key,filePtr): Encrypt the contents of a file using a key (bytes), returns a bytes object.file.decryptf(key,filePtr): Decrypt the contents of a file using a key (bytes), returns a string.
Variables
VERSION: Module version information, string.LICENSE: Module licensing information, string.
Installation
Copy the libfcrypt/ directory to your $PYTHONPATH directory, and import it like so:
import libfcrypt
Usage
import libfcrypt
# Generate a key
key = libfcrypt.base.gen_key()
# Encrypt a string
secrets = libfcrypt.encrypts(key,"I have so many secrets muahaha!")
# Write secrets to a file
with open("Secrets.txt","wb") as f:
f.write(secrets)
# Read secrets from a file
f = open("Secrets.txt","rb")
spilled_secrets = libfcrypt.file.decryptf(key,f)
# Spill secrets!
print(spilled_secrets)
Metadata
Release files for libfcrypt 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| libfcrypt-1.1.1.tar.gz | 2.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| libfcrypt-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.4 kB
Release files / libfcrypt-1.1.1.tar.gz
| Download URL | libfcrypt-1.1.1.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1357143b3676a9301032826b4998c4a2f595a7b05535628b3a3ac3d636af7fbb
|
|
BLAKE2b-256 checksum How to use checksums |
fd192f1f1931418e8d23e132b771debf1a18d8c7a41f932717f9f989d9ab7a54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / libfcrypt-1.1.1-py3-none-any.whl
| Download URL | libfcrypt-1.1.1-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8951bf91acf2ea697b0a30e1d7a95017f6beb2471ae68c10fcaeab2f46550d3b
|
|
BLAKE2b-256 checksum How to use checksums |
3ea7688596e6a5abfd67e17027d85a99b9fba7ee88aaeb51d6c7cacf71c0f1fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|