From acda74430f8ca4110695c175cef05ab54d7d8208 Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Sat, 29 Mar 2025 19:52:58 +0000 Subject: [PATCH] Edit register.html --- public/register.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/register.html b/public/register.html index 33bca01..cfa82fa 100644 --- a/public/register.html +++ b/public/register.html @@ -36,8 +36,12 @@ //For each random digit rnum.forEach((num) => { + //This function makes more sense when you realize I originally thought this'd be passed as part of the query string for some reason. + //Turns out nginx makes the smarter decision of sticking it in a POST body, so this didn't need to be so complicated :P + //Either way it's a good function for generating cryptographically secure URL-Safe NONCE's in the browser + //We cant use the entire ascii table since most of those chars aren't URL safe - //Instead we forst adjust the number to fit between the range of 0-77, then map parts of said range to the ascii table + //Instead we first adjust the number to fit between the range of 0-77, then map parts of said range to the ascii table //to generate a url-safe and crpytographically secure stream key let adjustedNum = Math.round(((num * 87) / 255));