| OLD | NEW |
| 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() |
| OLD | NEW |