def decrypt(self, data, pad=None, padmode=None):
ENCRYPT = des.ENCRYPT<EOL>DECRYPT = des.DECRYPT<EOL>data = self._guardAgainstUnicode(data)<EOL>if pad is not None:<EOL><INDENT>pad = self._guardAgainstUnicode(pad)<EOL><DEDENT>if self.getMode() == CBC:<EOL><INDENT>self.__key1.setIV(self.getIV())<EOL>self.__key2.setIV(self.getIV())<EOL>self.__key3.setIV(self.getIV())<EOL>i = <NUM_LIT:0><EOL>result = []<EOL>while i < len(data):<EOL><INDENT>iv = data[i:i+<NUM_LIT:8>]<EOL>block = self.__key3.crypt(iv,    DECRYPT)<EOL>block = self.__key2.crypt(block, ENCRYPT)<EOL>block = self.__key1.crypt(block, DECRYPT)<EOL>self.__key1.setIV(iv)<EOL>self.__key2.setIV(iv)<EOL>self.__key3.setIV(iv)<EOL>result.append(block)<EOL>i += <NUM_LIT:8><EOL><DEDENT>if _pythonMajorVersion < <NUM_LIT:3>:<EOL><INDENT>data = '<STR_LIT>'.join(result)<EOL><DEDENT>else:<EOL><INDENT>data = bytes.fromhex('<STR_LIT>').join(result)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>data = self.__key3.crypt(data, DECRYPT)<EOL>data = self.__key2.crypt(data, ENCRYPT)<EOL>data = self.__key1.crypt(data, DECRYPT)<EOL><DEDENT>return self._unpadData(data, pad, padmode)<EOL>
decrypt(data, [pad], [padmode]) -> bytes

        data : bytes to be encrypted
        pad  : Optional argument for decryption padding. Must only be one byte
        padmode : Optional argument for overriding the padding mode.

        The data must be a multiple of 8 bytes and will be decrypted
        with the already specified key. In PAD_NORMAL mode, if the
        optional padding character is supplied, then the un-encrypted
        data will have the padding characters removed from the end of
        the bytes. This pad removal only occurs on the last 8 bytes of
        the data (last data block). In PAD_PKCS5 mode, the special
        padding end markers will be removed from the data after
        decrypting, no pad character is required for PAD_PKCS5.