Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: third_party/tlslite/tlslite/utils/python_aes.py

Issue 211173006: Perform tlslite 0.3.8 -> 0.4.6 renames ahead of time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Drop the -B Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 """Pure-Python AES implementation.""" 1 """Pure-Python AES implementation."""
2 2
3 from cryptomath import * 3 from cryptomath import *
4 4
5 from AES import * 5 from aes import *
6 from rijndael import rijndael 6 from rijndael import rijndael
7 7
8 def new(key, mode, IV): 8 def new(key, mode, IV):
9 return Python_AES(key, mode, IV) 9 return Python_AES(key, mode, IV)
10 10
11 class Python_AES(AES): 11 class Python_AES(AES):
12 def __init__(self, key, mode, IV): 12 def __init__(self, key, mode, IV):
13 AES.__init__(self, key, mode, IV, "python") 13 AES.__init__(self, key, mode, IV, "python")
14 self.rijndael = rijndael(key, 16) 14 self.rijndael = rijndael(key, 16)
15 self.IV = IV 15 self.IV = IV
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 #XOR with the chaining block and overwrite the input with output 59 #XOR with the chaining block and overwrite the input with output
60 for y in range(16): 60 for y in range(16):
61 decryptedBytes[y] ^= chainBytes[y] 61 decryptedBytes[y] ^= chainBytes[y]
62 ciphertextBytes[(x*16)+y] = decryptedBytes[y] 62 ciphertextBytes[(x*16)+y] = decryptedBytes[y]
63 63
64 #Set the next chaining block 64 #Set the next chaining block
65 chainBytes = blockBytes 65 chainBytes = blockBytes
66 66
67 self.IV = bytesToString(chainBytes) 67 self.IV = bytesToString(chainBytes)
68 return bytesToString(ciphertextBytes) 68 return bytesToString(ciphertextBytes)
OLDNEW
« no previous file with comments | « third_party/tlslite/tlslite/utils/pycrypto_tripledes.py ('k') | third_party/tlslite/tlslite/utils/python_rc4.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698