home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / var / lib / python-support / python2.6 / gdata / tlslite / utils / RC4.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-04-20  |  1.2 KB  |  26 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. '''Abstract class for RC4.'''
  5. from compat import *
  6.  
  7. class RC4:
  8.     
  9.     def __init__(self, keyBytes, implementation):
  10.         if len(keyBytes) < 16 or len(keyBytes) > 256:
  11.             raise ValueError()
  12.         len(keyBytes) > 256
  13.         self.isBlockCipher = False
  14.         self.name = 'rc4'
  15.         self.implementation = implementation
  16.  
  17.     
  18.     def encrypt(self, plaintext):
  19.         raise NotImplementedError()
  20.  
  21.     
  22.     def decrypt(self, ciphertext):
  23.         raise NotImplementedError()
  24.  
  25.  
  26.