def check_unpad(self, padded_message): assert_equal(padded_message, Crypto.unpad(Crypto.pad(padded_message)))
def check_pad(self, message): padded_message = Crypto.pad(message) assert_greater_equal(len(padded_message), len(padded_message)) assert_equal(0, len(padded_message) % Crypto.BLOCK_SIZE)