'A convenience method which pads and encrypts at once.'

def Encrypt(self, data):

    encryptor = self.GetEncryptor()
    padded_data = self.Pad(data)
    try:
        return (encryptor.update(padded_data) + encryptor.finalize())
    except ValueError as e:
        raise CipherError(e)
