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

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

Issue 210323002: Update tlslite to 0.4.6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Executable bit and --similarity=80 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 # Author: Trevor Perrin
2 # See the LICENSE file for legal information regarding use of this file.
3
1 """Abstract class for RC4.""" 4 """Abstract class for RC4."""
2 5
3 from compat import * #For False
4 6
5 class RC4: 7 class RC4(object):
6 def __init__(self, keyBytes, implementation): 8 def __init__(self, keyBytes, implementation):
7 if len(keyBytes) < 16 or len(keyBytes) > 256: 9 if len(keyBytes) < 16 or len(keyBytes) > 256:
8 raise ValueError() 10 raise ValueError()
9 self.isBlockCipher = False 11 self.isBlockCipher = False
10 self.name = "rc4" 12 self.name = "rc4"
11 self.implementation = implementation 13 self.implementation = implementation
12 14
13 def encrypt(self, plaintext): 15 def encrypt(self, plaintext):
14 raise NotImplementedError() 16 raise NotImplementedError()
15 17
16 def decrypt(self, ciphertext): 18 def decrypt(self, ciphertext):
17 raise NotImplementedError() 19 raise NotImplementedError()
OLDNEW
« no previous file with comments | « third_party/tlslite/tlslite/utils/python_rsakey.py ('k') | third_party/tlslite/tlslite/utils/rijndael.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698