Image Node à la place de Caddy, make serve, types de Node pour le lint du serveur
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
86bf709da3
commit
237fa8b8e4
@@ -55,7 +55,7 @@ function toBase32(bytes) {
|
||||
return out;
|
||||
}
|
||||
|
||||
/** @param {string} text 26 caractères de l'alphabet @returns {Uint8Array|null} */
|
||||
/** @param {string} text 26 caractères de l'alphabet @returns {Uint8Array<ArrayBuffer>|null} */
|
||||
function fromBase32(text) {
|
||||
const out = new Uint8Array(KEY_BYTES);
|
||||
let bits = 0, value = 0, i = 0;
|
||||
@@ -173,7 +173,7 @@ export function toBase64url(bytes) {
|
||||
return btoa(binary).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
||||
}
|
||||
|
||||
/** @param {string} text @returns {Uint8Array|null} */
|
||||
/** @param {string} text @returns {Uint8Array<ArrayBuffer>|null} */
|
||||
export function fromBase64url(text) {
|
||||
if (!/^[A-Za-z0-9_-]*$/.test(text) || text.length % 4 === 1) return null;
|
||||
const binary = atob(text.replace(/-/g, "+").replace(/_/g, "/") + "=".repeat((4 - (text.length % 4)) % 4));
|
||||
|
||||
Reference in New Issue
Block a user