tlslite.utils.rc4

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