Skip to content

Commit

Permalink
Merge pull request #5 from DIP-POLLEY/master
Browse files Browse the repository at this point in the history
Fixing Extra space problem
  • Loading branch information
apratimshukla6 authored Oct 23, 2020
2 parents 3c5e82a + 0d4da9c commit 7d51028
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions enyo/enyodecryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ def decode(self,str):
bits+=format(ord(i)-71,'06b')
else:
bits+=format(ord(i)+4,'06b')
# Removing the extra zeros from the end
l2 = len(bits)//8
bits = bits[0:8*l2]
for i in range(0,len(bits),8):
if (i/8!=len(bits)//8):
decodedWord = decodedWord+chr(int(bits[i:i+8],2))
decodedWord = decodedWord+chr(int(bits[i:i+8],2))

return decodedWord

def binarySwap(self,str):
Expand Down

0 comments on commit 7d51028

Please sign in to comment.