from fastapi import APIRouter, Request
from fastapi.templating import Jinja2Templates

security_router = APIRouter(prefix="/security", tags=["security"])
templates = Jinja2Templates(directory="templates")


@security_router.get("/browser")
async def browser_local_cryptography_strength(request: Request):
    return templates.TemplateResponse(
        request=request, name="browser_random_number.html", contents={"rand": "rand"}
    )

@security_router.get("/pigeonhole")
async def pigeonhole_principle_simulation(request: Request):
    return templates.TemplateResponse(
        request=request, name="pigeonhole.html"
    )

@security_router.get("/noise-letter")
async def noise_letter_visualization(request: Request):
    return templates.TemplateResponse(
        request=request, name="noise_letter.html"
    )