Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / tlslite / tlslite / utils / rc4.py
1 # Author: Trevor Perrin
2 # See the LICENSE file for legal information regarding use of this file.
3
4 """Abstract class for RC4."""
5
6
7 class RC4(object):
8     def __init__(self, keyBytes, implementation):
9         if len(keyBytes) < 16 or len(keyBytes) > 256:
10             raise ValueError()
11         self.isBlockCipher = False
12         self.name = "rc4"
13         self.implementation = implementation
14
15     def encrypt(self, plaintext):
16         raise NotImplementedError()
17
18     def decrypt(self, ciphertext):
19         raise NotImplementedError()