Added more debug to block.py

master
E. Almqvist 5 years ago
parent fea7c17c10
commit 64f2c22fac
  1. 3
      block.py

@ -23,15 +23,18 @@ def keyToIntTuple(key):
def applyKeyToBlock(keyT, blockL): # function to apply a key to a block
blockDe = [""] * blockSize
if(in_mode == 0):
print("Encrypting block: " + str(blockL) )
for i in range(blockSize):
blockDe[i] = blockL[keyT[i]] # encrypting
elif(in_mode == 1):
print("Decrypting block: " + str(blockL) )
for i in range(blockSize):
blockDe[keyT[i]] = blockL[i] # decrypting
return blockDe
def splitInput(inputL, n):
print("Splitting input: " + str(n))
out = []
inputLen = len(inputL)
x = inputLen / float(n)

Loading…
Cancel
Save