OLD | NEW |
---|---|
(Empty) | |
1 """Abstract class for RC4.""" | |
2 | |
3 from compat import * #For False | |
4 | |
5 class RC4: | |
6 def __init__(self, keyBytes, implementation): | |
7 if len(keyBytes) < 16 or len(keyBytes) > 256: | |
8 raise ValueError() | |
9 self.isBlockCipher = False | |
10 self.name = "rc4" | |
11 self.implementation = implementation | |
12 | |
13 def encrypt(self, plaintext): | |
14 raise NotImplementedError() | |
15 | |
16 def decrypt(self, ciphertext): | |
17 raise NotImplementedError() | |
OLD | NEW |