
oCrypt0r - A minimalistic, simple AES encryption library written in python3.
oCrypt0r allows you to encrypt and decrypt strings of text via AES. Your encrypted data/strings can only be decrypted using your own custom key and salt you set before encrypting said data. You can use this for a variety of things from securing passwords to securing communication to encrypting HWIDs and directories/folders. Making AES encryption a little bit easier!
Updates
What has been updated as of | 7/17/22:
- Encryption functions now take 3 args instead of 4.
- Removed the hashing feature that makes a blake2b hash of a key to be used in the encryption. This basically made things less unique as the hash was just all 0-9 and lowercase a-z characters.
Installation
[Directly from here/this repo.]
[therealOri ~]$ pip install git+https://github.com/therealOri/oCrypt0r
or
[From Pypi.]
[therealOri ~]$ pip install oCrypt0r
Code Examples
If you would like to make this look better/more presentable. Please by all means make a pull request xD. I'm not the best with making things look great.
It is important to know that all functions will take 3 values. 2 for the making of the encryption key, and 1 for what you want encrypted/decrypted.
The encryption takes 2 values to make a key. The key then gets plugged into the AES encryption as a cipher. All of that will be used to encrypt whatever you want as a value. "strings", "files", or "directories/folders". (inclusing sub-directories)
You can read more about what the arguments do in the documentation.
from ocryptor import oCrypt
##---------Strings---------##
#Encrypting Strings
string = 'Hello Wolrd <3'
enc_key = "abcdefgHIJKLMNOP~!@#$%^&*"
enc_salt = 'qrstuvwxyz1234567890'
str_enc = oCrypt().string_encrypt(string, enc_key, enc_salt)
print(str_enc) # Output is b64 encoded. => VpqFynzUPOK3dHYaCFO57IGlYrQRyzt2NvmzMEN2+AA=
#Decrypting Strings
string = 'VpqFynzUPOK3dHYaCFO57IGlYrQRyzt2NvmzMEN2+AA='
enc_key = "abcdefgHIJKLMNOP~!@#$%^&*"
enc_salt = 'qrstuvwxyz1234567890'
str_dcr = oCrypt().string_decrypt(string, enc_key, enc_salt)
print(str_dcr) # Output is "Hello Wolrd <3"
##---------Strings End---------##
##---------Files---------##
#Encrypting Files
file_path = '/home/therealOri/Projects/example.txt'
enc_key = "abcdefgHIJKLMNOP~!@#$%^&*"
enc_salt = 'qrstuvwxyz1234567890'
oCrypt().file_encrypt(file_path, enc_key, enc_salt)
#Decrypting Files
file_path = '/home/therealOri/Projects/example.txt.oCrypted' # .oCrypted is what is used to let you know that the file is encrypted.
enc_key = "abcdefgHIJKLMNOP~!@#$%^&*"
enc_salt = 'qrstuvwxyz1234567890'
oCrypt().file_decrypt(file_path, enc_key, enc_salt)
##---------Files End---------##
##---------Directories---------##
#Encrypting Directory
dir_path = '/home/therealOri/Projects' #Must be a path to the directory you want to encrypt.
enc_key = "abcdefgHIJKLMNOP~!@#$%^&*"
enc_salt = 'qrstuvwxyz1234567890'
oCrypt().dir_encrypt(dir_path, enc_key, enc_salt)
#Decrypting Directory
dir_path = '/home/therealOri/Projects'
enc_key = "abcdefgHIJKLMNOP~!@#$%^&*"
enc_salt = 'qrstuvwxyz1234567890'
oCrypt().dir_decrypt(dir_path, enc_key, enc_salt)
##---------Directories End---------##
Support | Buy me a coffee <3
Donate to me here:
- Don't have Cashapp? Sign Up
Metadata
Release files for oCrypt0r 1.0.9.post1
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 |
|---|---|---|---|---|
| oCrypt0r-1.0.9.post1.tar.gz | 16.5 kB | Without provenance | Details for oCrypt0r-1.0.9.post1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| oCrypt0r-1.0.9.post1-py3-none-any.whl | Python 3 | none | any | Details for oCrypt0r-1.0.9.post1-py3-none-any.whl |
Total release size: 33.4 kB
Release files / oCrypt0r-1.0.9.post1.tar.gz
| Download URL | oCrypt0r-1.0.9.post1.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6030ff61e2ea1d4c1e6c8d7b7e3c70a6332978615fd01bc0e1a6e87aa31aaecd
|
|
BLAKE2b-256 checksum How to use checksums |
79bd9ca36568aee13d3b3b90c99474032cb902b116e3e1082d9d1141421991d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / oCrypt0r-1.0.9.post1-py3-none-any.whl
| Download URL | oCrypt0r-1.0.9.post1-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e6952b0326b8de6116a96819173764556442ae5159d947c96ac1e2e93e866d8
|
|
BLAKE2b-256 checksum How to use checksums |
26f7924c2e572545a75a28665d7a35b9b9e9f4c3c046de76e40e72d818849867
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for oCrypt0r 1.0.9.post1
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.