def process_result_value(self, value, dialect):
        """
        Decrypt values on the way out of the database.

        MultiFernet tries each key until one works.
        """

        # we assume that the user's keys are already Fernet keys (32 byte
        # keys that have been base64 encoded).
        self.keys = [Fernet(key) for key in get_keys()]

        # if the value is not a string we aren't going to try to decrypt
        # it. this is for the case where the column is null
        if not value:
            return

        try:
            return MultiFernet(self.keys).decrypt(value).decode("utf8")
        except cryptography.fernet.InvalidToken as e:
            if current_app.config.get("DEBUG", False):
                current_app.logger.error(f"Error decrypting token: {value}")
            else:
                current_app.logger.error("Error decrypting token.  (Enable debugging mode to log the token.)")
            raise

        Decrypt values on the way out of the database.

        MultiFernet tries each key until one works.
        
lemur/utils.py