Last active
September 6, 2026 07:37
-
-
Save sachadee/3624c2faef2008fd6b5a73e19e08d78a to your computer and use it in GitHub Desktop.
Fast API with FERNET
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sqlite3 | |
| import random | |
| import os | |
| import base64 | |
| import uuid | |
| from typing import Tuple | |
| from fastapi import FastAPI, HTTPException | |
| from pydantic import BaseModel | |
| import io | |
| from cryptography.hazmat.primitives import hashes | |
| from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC | |
| from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes | |
| from cryptography.hazmat.backends import default_backend | |
| app = FastAPI(title="Simple Polynomial Key Server (String & CSV)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment