Package tlslite :: Package utils :: Module rc4
[hide private]
[frames] | no frames]

Source Code for Module tlslite.utils.rc4

 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.isAEAD = False 13 self.name = "rc4" 14 self.implementation = implementation
15
16 - def encrypt(self, plaintext):
17 raise NotImplementedError()
18
19 - def decrypt(self, ciphertext):
20 raise NotImplementedError()
21