Skip to content

Commit

Permalink
Merge pull request #4 from kunatastic/master
Browse files Browse the repository at this point in the history
Update enyodecryption.py
  • Loading branch information
apratimshukla6 authored Oct 23, 2020
2 parents b49f2fd + 1061902 commit 3c5e82a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions enyo/enyodecryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def decode(self,str):
else:
bits+=format(ord(i)+4,'06b')
for i in range(0,len(bits),8):
decodedWord = decodedWord+chr(int(bits[i:i+8],2))
if (i/8!=len(bits)//8):
decodedWord = decodedWord+chr(int(bits[i:i+8],2))
return decodedWord

def binarySwap(self,str):
Expand Down Expand Up @@ -186,4 +187,4 @@ def decryption(self):
index += 1
if(index>len(self.key[0])-1):
index = 0
return decrypted
return decrypted

0 comments on commit 3c5e82a

Please sign in to comment.