diff options
Diffstat (limited to 'chromium/third_party/tlslite/tlslite/utils/rc4.py')
-rw-r--r-- | chromium/third_party/tlslite/tlslite/utils/rc4.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/chromium/third_party/tlslite/tlslite/utils/rc4.py b/chromium/third_party/tlslite/tlslite/utils/rc4.py new file mode 100644 index 00000000000..809026a21ce --- /dev/null +++ b/chromium/third_party/tlslite/tlslite/utils/rc4.py @@ -0,0 +1,19 @@ +# Author: Trevor Perrin +# See the LICENSE file for legal information regarding use of this file. + +"""Abstract class for RC4.""" + + +class RC4(object): + def __init__(self, keyBytes, implementation): + if len(keyBytes) < 16 or len(keyBytes) > 256: + raise ValueError() + self.isBlockCipher = False + self.name = "rc4" + self.implementation = implementation + + def encrypt(self, plaintext): + raise NotImplementedError() + + def decrypt(self, ciphertext): + raise NotImplementedError()
\ No newline at end of file |