An Encryption algorithm for encrypting ay text.
Project description
# equation_cipher
The encryption algorithm which uses two steps encryption.
This algorithm will be a half way decryptable algorithm; i.e. To get its
decryption you will need to encrypt it partially and encrypt it partially to
check if the encrypted form of the text is right form or not.
# Features
Uses one way encryption and half way decryption.
Creates different and unique encryption of the same target string every second.
Can be partially decrypted.
# Usage
```
$ pip install equation-cipher
```
```
import datetime
from cipher.equation_cipher import Encrypter
from cipher.equation_decipher import Decrypter
target = 'hello@123'
encrypter_obj = Encrypter()
encrypted_target = encrypter_obj.encrypt(target)
print("encrypted string", encrypted_target)
# here datetime object is required, since the algorithm uses date as well as time.
encryption_by_date = encrypter_obj.encrypt_by_date(target, datetime.datetime.now())
print("Encrypted by date:", encryption_by_date)
# decryption
decrypter_obj = Decrypter()
decrypted_text_check = decrypter_obj.match_decrypt('hello@123', encrypted_target)
if encrypted_text_check:
print("The passed string matches the passed encrypted pattern.")
else:
print("The passed string does not match the passed encrypted pattern.")
```
The encryption algorithm which uses two steps encryption.
This algorithm will be a half way decryptable algorithm; i.e. To get its
decryption you will need to encrypt it partially and encrypt it partially to
check if the encrypted form of the text is right form or not.
# Features
Uses one way encryption and half way decryption.
Creates different and unique encryption of the same target string every second.
Can be partially decrypted.
# Usage
```
$ pip install equation-cipher
```
```
import datetime
from cipher.equation_cipher import Encrypter
from cipher.equation_decipher import Decrypter
target = 'hello@123'
encrypter_obj = Encrypter()
encrypted_target = encrypter_obj.encrypt(target)
print("encrypted string", encrypted_target)
# here datetime object is required, since the algorithm uses date as well as time.
encryption_by_date = encrypter_obj.encrypt_by_date(target, datetime.datetime.now())
print("Encrypted by date:", encryption_by_date)
# decryption
decrypter_obj = Decrypter()
decrypted_text_check = decrypter_obj.match_decrypt('hello@123', encrypted_target)
if encrypted_text_check:
print("The passed string matches the passed encrypted pattern.")
else:
print("The passed string does not match the passed encrypted pattern.")
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
equation_cipher-0.0.4.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for equation_cipher-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bae8f472b83fbf605200ff056c16007ca0c639a148aaea4e49860f27ce0d31f4 |
|
MD5 | f7ce59fc35407070bfdfaeb7c9ca0a20 |
|
BLAKE2b-256 | 19de9128e46126634bedde123068eb9532347b831b9d5643ab97c01a86a06f48 |