ドメインページを最適化する

This commit is contained in:
Mouriya
2024-08-08 15:30:09 +09:00
parent ad96c923b2
commit 914b0d85df
3 changed files with 109 additions and 62 deletions

View File

@@ -35,6 +35,8 @@ def create_access_token(*, data: dict, expires_delta: timedelta = None):
return encoded_jwt
def chacha20Encrypt(plaintext:str, key=config.KINTONE_PSW_CRYPTO_KEY):
if plaintext is None or plaintext == '':
return None
nonce = os.urandom(16)
algorithm = algorithms.ChaCha20(key, nonce)
cipher = Cipher(algorithm, mode=None)