'data has to be padded'

def encrypt(self, data):

    if (not self.pyaes):
        return self.cipher.encrypt(data)
    else:
        encrypted = ''
        for i in range(0, len(data), 16):
            encrypted += self.cipher.encrypt(data[i:(i + 16)])
        return encrypted
