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

Side by Side Diff: third_party/tlslite/tlslite/utils/cryptlib_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 """Cryptlib AES implementation.""" 1 """Cryptlib AES implementation."""
2 2
3 from cryptomath import * 3 from cryptomath import *
4 from AES import * 4 from aes import *
5 5
6 if cryptlibpyLoaded: 6 if cryptlibpyLoaded:
7 7
8 def new(key, mode, IV): 8 def new(key, mode, IV):
9 return Cryptlib_AES(key, mode, IV) 9 return Cryptlib_AES(key, mode, IV)
10 10
11 class Cryptlib_AES(AES): 11 class Cryptlib_AES(AES):
12 12
13 def __init__(self, key, mode, IV): 13 def __init__(self, key, mode, IV):
14 AES.__init__(self, key, mode, IV, "cryptlib") 14 AES.__init__(self, key, mode, IV, "cryptlib")
(...skipping 10 matching lines...) Expand all
25 AES.encrypt(self, plaintext) 25 AES.encrypt(self, plaintext)
26 bytes = stringToBytes(plaintext) 26 bytes = stringToBytes(plaintext)
27 cryptlib_py.cryptEncrypt(self.context, bytes) 27 cryptlib_py.cryptEncrypt(self.context, bytes)
28 return bytesToString(bytes) 28 return bytesToString(bytes)
29 29
30 def decrypt(self, ciphertext): 30 def decrypt(self, ciphertext):
31 AES.decrypt(self, ciphertext) 31 AES.decrypt(self, ciphertext)
32 bytes = stringToBytes(ciphertext) 32 bytes = stringToBytes(ciphertext)
33 cryptlib_py.cryptDecrypt(self.context, bytes) 33 cryptlib_py.cryptDecrypt(self.context, bytes)
34 return bytesToString(bytes) 34 return bytesToString(bytes)
OLDNEW
« no previous file with comments | « third_party/tlslite/tlslite/utils/cipherfactory.py ('k') | third_party/tlslite/tlslite/utils/cryptlib_rc4.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698