cryptofy
Simple encryption/decryption functions for Python
Installation
pip install cryptofy
Usage
Generate a secret:
from cryptofy import encoding, generate_secret
key = generate_secret().decode(encoding)
print(key) # Output randomized secret
Encrypt a string:
from cryptofy import encoding, encrypt
string = "my-password"
key = "my-secret"
encrypted = encrypt(bytes(key, encoding=encoding), bytes(string, encoding))
print(encrypted) # Output ciphertext
Decrypt ciphertext:
from cryptofy import encoding, decrypt
encrypted = "<ciphertext>"
key = "my-secret"
string = decrypt(bytes(key, encoding=encoding), encrypted).decode(encoding)
print(string) # Output decrypted string
Command Line
Usage:
cryptofy ((-d | -e) -k <key> -s <source>) | (-n [-l <length>])
Example 1: Generate a secret
cryptofy -n
Example 2: Encrypt a string:
cryptofy -e -k "my-secret" -s "my-password"
Example 3: Decrypt ciphertext:
cryptofy -d -k "my-secret" -s "<ciphertext>"
License
Distributed under the Apache, version 2.0 license.
Metadata
Release files for cryptofy 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 | Provenance | |
|---|---|---|---|---|
| cryptofy-1.1.0.tar.gz | 6.8 kB | Without provenance | Details |
Release files / cryptofy-1.1.0.tar.gz
| Download URL | cryptofy-1.1.0.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d1c03957bd9c98654158d305fc5ce521562606c2bc30ab5106f724cd7fc3a7f
|
|
BLAKE2b-256 checksum How to use checksums |
7d1dc9a9380a4e8e426831e2b4a5f1e8291ac4c0eef31786ba3ba40c6b079d04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.4
|
Security for cryptofy 1.1.0
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.