Ver Mensaje Individual
  #4 (permalink)  
Antiguo 14/04/2002, 13:32
Avatar de Aleph
Aleph
 
Fecha de Ingreso: agosto-2001
Ubicación: Kenolandia
Mensajes: 1.061
Antigüedad: 22 años, 9 meses
Puntos: 3
Re: Compartiendo script (para mejorarlo)

/* define objeto BBB */
function BBB(alfabeto)
{
// inicializa y valida la propiedad alfabeto
this.alfabeto = alfabeto;
if (this.alfabeto == null){ this.alfabeto = "abcdefghijklmnñopqrstuvwxyz "; }
if (typeof(this.alfabeto) != "string"){ alert ("El alfabeto debe ser una cadena de caracteres"); return; }

// crea un array con cada caracter del alfabeto
this.abc = new Array();
for (x = 0; x < this.alfabeto.length; x++)
{
this.abc[x] = this.alfabeto.charAt(x);
}

this.encript = new String; // texto encriptado
this.encriptar = encriptar; // metodo encriptar
this.desencriptar = desencriptar; // metodo desencriptar
}

<div align="right">Guerrillero del ERF</div>