Edit register.html
This commit is contained in:
parent
87952f36ff
commit
acda74430f
|
|
@ -36,8 +36,12 @@
|
||||||
|
|
||||||
//For each random digit
|
//For each random digit
|
||||||
rnum.forEach((num) => {
|
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
|
//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
|
//to generate a url-safe and crpytographically secure stream key
|
||||||
let adjustedNum = Math.round(((num * 87) / 255));
|
let adjustedNum = Math.round(((num * 87) / 255));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue