An Encryption algorithm for encrypting any 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 decrypt 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 decrypt 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.6.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for equation_cipher-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 712db220018e18378bcae88000ab37632641a99892bea084b6e95f23e656b4ab |
|
MD5 | 701a70f3f53f4e1e989fbcea0f2bf60a |
|
BLAKE2b-256 | 7720a57ea554c278046a2eaf561a34eb9037952c3196cd6493a9473906e0814f |