Return plaintext for given ciphertext.

def decrypt(self, ciphertext):
        """Return plaintext for given ciphertext."""

        # String to bytes.
        cipherbytes = ciphertext.encode('utf8')

        # Decode from Base64.
        try:
            combined = base64.b64decode(cipherbytes)
        except (base64.binascii.Error, TypeError) as e:
            # base64.binascii.Error for Python 3.
            # TypeError for Python 2.
            raise DataIntegrityError("Cipher text is damaged: {}".format(e))

        # Split out the nonce, tag, and encrypted data.
        nonce = combined[:12]
        if len(nonce) != 12:
            raise DataIntegrityError("Cipher text is damaged: invalid nonce length")

        tag = combined[12:28]
        if len(tag) != 16:
            raise DataIntegrityError("Cipher text is damaged: invalid tag length")

        encrypted = combined[28:]

        # Construct AES cipher, with old nonce.
        cipher = AES.new(self.cipher_key, AES.MODE_GCM, nonce)

        # Decrypt and verify.
        try:
            compressed = cipher.decrypt_and_verify(encrypted, tag)
        except ValueError as e:
            raise DataIntegrityError("Cipher text is damaged: {}".format(e))

        # Decompress plaintext bytes.
        plainbytes = zlib.decompress(compressed)

        # Bytes to string.
        plaintext = plainbytes.decode('utf8')

        # Return plaintext.
        return plaintext