https://github.com/mauricelambert/customcrypto
This package implements tools to build your custom cipher
https://github.com/mauricelambert/customcrypto
cipher cryptography encryption pypi-package python3
Last synced: 3 months ago
JSON representation
This package implements tools to build your custom cipher
- Host: GitHub
- URL: https://github.com/mauricelambert/customcrypto
- Owner: mauricelambert
- License: gpl-3.0
- Created: 2021-11-08T20:53:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-09T07:28:07.000Z (over 3 years ago)
- Last Synced: 2025-01-14T09:14:45.448Z (5 months ago)
- Topics: cipher, cryptography, encryption, pypi-package, python3
- Language: Python
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README

# CustomCrypto
## Description
This package implements tools to build your custom cipher.
## Requirements
This package require :
- python3
- python3 Standard Library## Installation
```bash
pip install CustomCrypto
```## Usages
### Python script
```python
from CustomCrypto import CustomCrypto, xor, viginere, decipher_viginere
import stringcrypto = CustomCrypto(xor)
cipher = crypto.dynamic_key_1(b'00', [ord('0')])
decipher = bytes(crypto.reverse_dynamic_key_1(cipher, [ord('0')]))cipher = CustomCrypto(viginere, string.ascii_uppercase, alphabet_length=26).dynamic_key_2('ACCA', ('C', 'A'))
decipher = CustomCrypto(decipher_viginere, string.ascii_uppercase, alphabet_length=26).dynamic_key_2('CCCC', ('C', 'A'))crypto = CustomCrypto(None)
shuffle_data = crypto.shuffle('ABCDEFGH', 4)
data = crypto.unshuffle(shuffle_data, 4)shuffle_data = crypto.reverse('ABCD')
data = crypto.reverse(shuffle_data)modified_data = crypto.shift(b'\xff\x00\xf0\xa5\xaa')
data = crypto.shift(modified_data)lines = crypto.group('0' * 40, '0')
lines = "\n".join(" ".join("".join(chars) for chars in words) for words in lines)
print(lines)
```## Links
- [Github Page](https://github.com/mauricelambert/CustomCrypto/)
- [Documentation](https://mauricelambert.github.io/info/python/security/CustomCrypto.html)
- [Pypi package](https://pypi.org/project/CustomCrypto/)## Licence
Licensed under the [GPL, version 3](https://www.gnu.org/licenses/).