Connection and messages are now correct and fluently pass between client and server.
This commit is contained in:
@@ -6,6 +6,7 @@ import random
|
||||
import time
|
||||
from flask import Flask
|
||||
import os
|
||||
import ast
|
||||
|
||||
|
||||
def generate_api_key(prefix="EveAI-Chat"):
|
||||
@@ -72,6 +73,8 @@ class JosKMSClient(kms_v1.KeyManagementServiceClient):
|
||||
|
||||
def decrypt_api_key(self, encrypted_data):
|
||||
"""Decrypts the API key using the specified key version."""
|
||||
if isinstance(encrypted_data, str):
|
||||
encrypted_data = ast.literal_eval(encrypted_data)
|
||||
key_version = encrypted_data['key_version']
|
||||
key_name = self.key_name
|
||||
encrypted_dek = b64decode(encrypted_data['encrypted_dek'].encode('utf-8'))
|
||||
|
||||
Reference in New Issue
Block a user