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.0
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.0.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| libfcrypt-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.4 kB
Release files / libfcrypt-1.1.0.tar.gz
| Download URL | libfcrypt-1.1.0.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2be8e151f553b676c967c5c6eb413ab96ee2c5a0a1f6a312b27fa8eba6b5f7fc
|
|
BLAKE2b-256 checksum How to use checksums |
10b394035a057011eafa7bf88f0d1ba5218b49071f772d78ac7d8190370d0e1d
|
| 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.0-py3-none-any.whl
| Download URL | libfcrypt-1.1.0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f86a0c9107c16b8dcf8b1ad003906ab750ff41cbeb05e57dad7b631e67b26906
|
|
BLAKE2b-256 checksum How to use checksums |
686dba53e7e80f215b81030b08c846db955fdd9b330db0d57f92549939b2b20e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|