NHXCrypt is a module that uses NHXCrypt--8-128 Algorithms to encrypt and decrypt the files using a single key with a 'mathless' cryptography technique.
Project description
NHXCrypt
NHXCrypt is a tool that uses NHXCrypt--8-128 Algorithms to encrypt and decrypt the files using a single key.
Main Features:
- Support for reading and writing data from and to files (Encryption/Decryption)
- Using 8, 16, 32, 62 and 128 characters to represent each character to make encryption effective.
- Easy single key decryption
How NHXCrypt Encrypts/Decrypts data?
NHXCrypt uses simple techniques to make encryption possible. Each character in the data file is shuffled between random numbers in accordance with the location corrosponded by the key. Any ASCII character is acceptable as key. If the mode is other than 64 or 128, the key would also alter the original data in order to make it difficult for real data extraction.
Modes available
The suffix at the end of the name indicates the amount of characters a single character is going to be translated into. The modes include:
- NHXCrypt-8
- NHXCrypt-16
- NHXCrypt-32
- NHXCrypt-64
- NHXCrypt-128
Installation
NHXCrypt requires Python 3+. To use it as a module, install NHXCrypt using pip:
pip3 install NHXCrypt
To use it as a tool, Download: NHXCrypt.py and use it via python3 shell:
$ python3 NHXCrypt.py
or in Linux or MacOS, directly as:
$ git clone https://www.github.com/chmuhammadsohaib/NHXCrypt
$ cd NHXCrypt
$ chmod +x NHXCrypt.py
$ ./NHXCrypt.py
Usage
Using NHXCrypt as a tool is simple. One argument is required, which is the image file to read or write data to, and the second optional argument is the file to read the data from, to be written to image, or the file for writng back the extracted data from the image file.
$ NHXCrypt.py <data file: input> <file name for output (overwritten if exixts)>
To use it as a module, simply use it as follows:
import NHXCrypt
handler = NHXCrypt.NHXCrypt(<key>, <mode>, <file handler opened in binary mode to read data/bytes to read>, <file handler opened in binary mode to write data/None to return data bytes with function [default=None]>, verbose=<True/False [default=False]>)
For Encrypting, type:
handler.encrypt()
To Decrypt, type:
handler.decrypt()
The functions return the data bytes on success when file write parameter is set to None. When verbose is set to True, an exception is raised rather than providing a status code. By default, a status code would be provided which can be used to raise exceptions in custom way, for example:
status = handler.decrypt()
if status == 0:
print("Success")
There are 6 different statuses:
Status Code | Meaning |
---|---|
0/Bytes | Operation Successful |
404 | Data File not Found |
500 | Invalid Mode |
505 | No Key provided |
600 | Encrypted Text corrupted or wrong mode selected |
Found NHXCrypt interesting? Go and Install it with just some simple steps!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file NHXCrypt-1.2.0.tar.gz
.
File metadata
- Download URL: NHXCrypt-1.2.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53e0a9ad4d56786544fab5f8631f1ee519d2f7c884f0f1cc8d9df6ac6016a1db |
|
MD5 | adda63fc6a1b367651db212f3f2074ac |
|
BLAKE2b-256 | 134a09f51fb25b9091610ae68c452324f887f67a8b0e52893cb198b23fe55709 |
File details
Details for the file NHXCrypt-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: NHXCrypt-1.2.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37378f3b31efff5859e3e1f254b2ee7a88fd65cbc0d9398377648dc7ac7a0a26 |
|
MD5 | 888748ef019f92bdde272f2366d4d71b |
|
BLAKE2b-256 | 9b6c9036b29e326baddc0499096b546613cb97f05e6f562d9be1631f4226959f |