We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccffab0 commit 17b5059Copy full SHA for 17b5059
simple_encryption_algo_python3/decrypt.py
@@ -0,0 +1,11 @@
1
+f1=open("encrypted_file.txt","r")
2
+s=f1.read()
3
+f1.close()
4
+s=list(s)
5
+for i in range(len(s)):
6
+ s[i]=chr(ord(s[i])-len(s)+i)
7
+s.reverse()
8
+s="".join(s)
9
+f2=open("decrypted_file.txt","w+")
10
+f2.write(s)
11
+f2.close()
simple_encryption_algo_python3/encrypt.py
+f1=open("file_before_enc.txt","r")
+ s[i]=chr(ord(s[i])+len(s)-i)
+f2=open("encrypted_file.txt","w+")
simple_encryption_algo_python3/file_before_enc.txt
@@ -0,0 +1 @@
+hello world...!!
0 commit comments