/gdata/tlslite/utils/RC4.py
http://radioappz.googlecode.com/ · Python · 17 lines · 12 code · 4 blank · 1 comment · 2 complexity · b94f3c7eb8656c3ef05e6c691d69fe30 MD5 · raw file
- """Abstract class for RC4."""
- from compat import * #For False
- class RC4:
- 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()