home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- '''Abstract class for 3DES.'''
- from compat import *
-
- class TripleDES:
-
- def __init__(self, key, mode, IV, implementation):
- if len(key) != 24:
- raise ValueError()
- len(key) != 24
- if mode != 2:
- raise ValueError()
- mode != 2
- if len(IV) != 8:
- raise ValueError()
- len(IV) != 8
- self.isBlockCipher = True
- self.block_size = 8
- self.implementation = implementation
- self.name = '3des'
-
-
- def encrypt(self, plaintext):
- if not len(plaintext) % 8 == 0:
- raise AssertionError
-
-
- def decrypt(self, ciphertext):
- if not len(ciphertext) % 8 == 0:
- raise AssertionError
-
-
-