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

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

Issue 875683002: Implement AES-GCM in tlslite. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
OLDNEW
1 # Author: Trevor Perrin 1 # Author: Trevor Perrin
2 # See the LICENSE file for legal information regarding use of this file. 2 # See the LICENSE file for legal information regarding use of this file.
3 3
4 """Abstract class for RC4.""" 4 """Abstract class for RC4."""
5 5
6 6
7 class RC4(object): 7 class RC4(object):
8 def __init__(self, keyBytes, implementation): 8 def __init__(self, keyBytes, implementation):
9 if len(keyBytes) < 16 or len(keyBytes) > 256: 9 if len(keyBytes) < 16 or len(keyBytes) > 256:
10 raise ValueError() 10 raise ValueError()
11 self.isBlockCipher = False 11 self.isBlockCipher = False
12 self.isAEAD = False
12 self.name = "rc4" 13 self.name = "rc4"
13 self.implementation = implementation 14 self.implementation = implementation
14 15
15 def encrypt(self, plaintext): 16 def encrypt(self, plaintext):
16 raise NotImplementedError() 17 raise NotImplementedError()
17 18
18 def decrypt(self, ciphertext): 19 def decrypt(self, ciphertext):
19 raise NotImplementedError() 20 raise NotImplementedError()
OLDNEW
« no previous file with comments | « third_party/tlslite/tlslite/utils/python_aesgcm.py ('k') | third_party/tlslite/tlslite/utils/tripledes.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698