eric6/Utilities/crypto/py3AES.py

changeset 8207
d359172d11be
parent 8205
4a0f1f896341
child 8220
006ee31b4835
equal deleted inserted replaced
8206:adf11836cfce 8207:d359172d11be
56 raise ValueError( 56 raise ValueError(
57 "Data ending with {0} can't be PCKS7-padded".format(b[-1])) 57 "Data ending with {0} can't be PCKS7-padded".format(b[-1]))
58 return b[:-numpads] 58 return b[:-numpads]
59 59
60 60
61 class AES(object): 61 class AES:
62 """ 62 """
63 Class implementing the Advanced Encryption Standard algorithm. 63 Class implementing the Advanced Encryption Standard algorithm.
64 """ 64 """
65 # valid key sizes 65 # valid key sizes
66 KeySize = { 66 KeySize = {
607 for ll in range(4): 607 for ll in range(4):
608 output[kk * 4 + ll] = block[kk + ll * 4] 608 output[kk * 4 + ll] = block[kk + ll * 4]
609 return output 609 return output
610 610
611 611
612 class AESModeOfOperation(object): 612 class AESModeOfOperation:
613 """ 613 """
614 Class implementing the different AES mode of operations. 614 Class implementing the different AES mode of operations.
615 """ 615 """
616 aes = AES() 616 aes = AES()
617 617

eric ide

mercurial