'Decrypts the provided ciphertext.
The ciphertext can be optionally base64 encoded.
Uses AES-128-CBC with an IV by default.
:param key: The Encryption key.
:param msg: the ciphetext, the first block is the IV
:returns plain: the plaintext message, after padding is removed.'

def decrypt(self, key, msg, b64decode=True):

    if b64decode:
        msg = base64.b64decode(msg)
    iv = msg[:self.cipher.block_size]
    cipher = self.cipher.new(key, self.cipher.MODE_CBC, iv)
    padded = cipher.decrypt(msg[self.cipher.block_size:])
    l = (ord(padded[(-1):]) + 1)
    plain = padded[:(- l)]
    return plain
