def decrypt(self,block): cipherText = serpent_ref.convertToBitstring(block.encode("hex").lower()[::-1], 128) plainText = serpent_ref.decrypt(cipherText, self.userKey) return serpent_ref.bitstring2hexstring(plainText)[::-1].decode('hex')
def decrypt(self, block): cipherText = serpent_ref.convertToBitstring( block.encode("hex").lower()[::-1], 128) plainText = serpent_ref.decrypt(cipherText, self.userKey) return serpent_ref.bitstring2hexstring(plainText)[::-1].decode('hex')
def decrypt(self,block): cipherText = serpent_ref.convertToBitstring(hexlify(block).decode().lower()[::-1], 128) plainText = serpent_ref.decrypt(cipherText, self.userKey) return unhexlify(serpent_ref.bitstring2hexstring(plainText)[::-1].encode())
def decrypt(self, block): cipherText = serpent_ref.convertToBitstring(revString(block.hex()), 128) plainText = serpent_ref.decrypt(cipherText, self.userKey) return codecs.decode( serpent_ref.bitstring2hexstring(plainText)[::-1], "hex_codec")