Created
March 15, 2018 18:29
-
-
Save rizwansoaib/56a5230386e8210058b727bfc441a421 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def encrypt(pt): | |
ct=pow(pt,13) | |
ct=ct%667 | |
print("\nYour Encrypt Data is:",ct) | |
def decrypt(ct): | |
pt=pow(ct,237) | |
pt=pt%667 | |
print("\nYour Decrypt Data is:",pt) | |
print("Enter choice:\n1- Encryption\n2- Decryption\n") | |
x=int(input()) | |
if(x==1): | |
print("\nPlease enter Data to Encrypt them\n") | |
num=int(input()) | |
encrypt(num) | |
if(x==2): | |
print("\nPlease enter number to Decrypt them\n") | |
num=int(input()) | |
decrypt(num) | |
print("\nDo You Want to Check it Enter 1:") | |
y=int(input()) | |
if(y==1): | |
print("\nPlease enter number to Dncrypt them\n") | |
num=int(input()) | |
decrypt(num) |
Great!
Bro ...is it encrypt only one number?
What I do for encrypt a sentence or word.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Encrypt data upto 667 decimal number
RSA ALGORITHM