// generateSecret generates a secure random string of the given length.exportasyncfunctiongenerateSecret(length) {
const bytes = crypto.getRandomValues(newUint8Array(length));
returnArray.from(bytes)
.map((b) => b.toString(16).padStart(2, "0"))
.join("");
}