API y Arquitectura
Resumen tecnico de como funciona la web y como reutilizar la logica de generacion segura en tus proyectos.
Arquitectura del sitio
El sitio es estatico y ligero. La generacion de contrasenas corre en el navegador sin depender de backend.
Modulo criptografico
Usamos window.crypto.getRandomValues() para obtener aleatoriedad fuerte y minimizar patrones predecibles.
Integracion rapida
Puedes reutilizar la funcion de generacion en cualquier app web y adaptar longitud, caracteres y politicas.
Ejemplo minimo
function generatePassword(length = 16, options = {}) {
const sets = {
lower: "abcdefghijklmnopqrstuvwxyz",
upper: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
numbers: "0123456789",
symbols: "!@#$%^&*()-_=+[]{};:,.?/"
};
let charset = "";
for (const [key, enabled] of Object.entries(options)) {
if (enabled && sets[key]) charset += sets[key];
}
if (!charset) throw new Error("Select at least one character type");
const bytes = new Uint32Array(length);
window.crypto.getRandomValues(bytes);
let output = "";
for (let i = 0; i < length; i += 1) {
output += charset[bytes[i] % charset.length];
}
return output;
}
FAQ tecnica
SafeKey guarda contrasenas?
No. La generacion ocurre localmente y no persistimos claves en servidor.
Hay endpoint REST publico?
No actualmente. Priorizamos privacidad y ejecucion client-side.
Puedo auditar el algoritmo?
Si. La implementacion esta en JavaScript y puede revisarse en el cliente.