
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Atom Encryption is a comprehensive Python library that provides tools for both reversible and irreversible encryption methods, as well as error detection mechanisms. It includes support for algorithms like AES, Twofish, RSA, ECC, and more.
TypeEncodeDecodeTools
class with various utility methods:
int_list_to_str
and str_to_int_list
: Convert between integer lists and strings.float_to_bytes
and bytes_to_float
: Convert between floats and bytes.hex_string_format_to_bytes
and bytes_to_hex_string_format
: Handle hex string and byte conversions.int_to_int_list
and int_list_to_int
: Convert integers to byte lists with MSB/LSB ordering and back.TypeEncodeDecodeTools
in test_type_encode_decode_tools.py
.You can install Atom Encryption from PyPI:
pip install atom-encryption
Or clone the repository and install it locally:
git clone https://github.com/yourusername/atom-encryption.git
cd atom-encryption
pip install .
The TypeEncodeDecodeTools
module provides utilities for various type conversions, such as integer lists to strings, bytes to floats, and more.
from atom_encryption.type_encode_decode_tools import TypeEncodeDecodeTools
tools = TypeEncodeDecodeTools()
# Example 1: Integer list to string and back
int_list = [72, 101, 108, 108, 111]
string = tools.int_list_to_str(int_list)
print("String:", string) # Output: "Hello"
print("Back to Integer List:", tools.str_to_int_list(string)) # Output: [72, 101, 108, 108, 111]
# Example 2: Float to bytes and back
float_value = 12.34
float_bytes = tools.float_to_bytes(float_value)
print("Bytes:", float_bytes)
print("Float:", tools.bytes_to_float(float_bytes))
# Example 3: Hex string format to bytes
byte_data = b"Hello"
formatted_hex = tools.bytes_to_hex_string_format(byte_data)
print("Hex String Format:", formatted_hex) # Output: "\x48\x65\x6c\x6c\x6f"
print("Bytes:", tools.hex_string_format_to_bytes(formatted_hex)) # Output: b"Hello"
# Example 4: Integer to integer list with MSB ordering
integer_value = 123456
int_list = tools.int_to_int_list(integer_value, specified_length=4, order="msb")
print("Integer List (MSB):", int_list) # Output: [0, 1, 226, 64]
print("Back to Integer:", tools.int_list_to_int(int_list, "msb")) # Output: 123456
from atom_encryption.error_detection_tools import ErrorDetectionTools
# Example: BCC
bcc = ErrorDetectionTools.BCC.generate(b"123456789")
print("BCC:", bcc)
from atom_encryption.irreversible_encryption_tools import IrreversibleEncryptionTools
# Example: SHA-256 Hashing
hashed_data = IrreversibleEncryptionTools.Hash.hash_data("HelloWorld", algorithm="sha256")
print("SHA-256 Hash:", hashed_data)
from atom_encryption.reversible_encryption_tools import ReversibleEncryptionTools
# Example: AES Encryption
aes_tool = ReversibleEncryptionTools.AES()
aes_tool.generate_key()
key = aes_tool.load_key()
encrypted = aes_tool.encrypt_data("Hello AES", key)
decrypted = aes_tool.decrypt_data(encrypted, key)
print("Decrypted:", decrypted)
Before you begin, ensure you have the following installed:
Install the dependencies:
pip install -r requirements.txt
To run the test, please clone the Github project and run the could below: Github link: atom_encryption
python -m unittest discover test
Make sure you have the required tools for building and uploading:
pip install build twine
Build the source distribution and wheel:
python -m build
This will generate the dist/
folder containing .tar.gz
and .whl
files.
Upload the package to PyPI using Twine:
twine upload dist/*
You will be prompted to enter your PyPI credentials. Once done, your package will be live on PyPI.
This project is licensed under the MIT License. See the LICENSE
file for details.
Contributions are welcome! If you have ideas for improvements or new features, feel free to fork the repository and submit a pull request.
FAQs
A Python library for reversible and irreversible encryption tools.
We found that atom-encryption demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.