Skip to content

Instantly share code, notes, and snippets.

View eduan's full-sized avatar
🏠
Working from home

.Eduan eduan

🏠
Working from home
View GitHub Profile
var Cromossomo = function(genes){
if(genes)
this.genes = genes;
this.custo = 10000;
};
Cromossomo.prototype.genes = '';
Cromossomo.prototype.random = function(tamanho){
this.genes = '';
@eduan
eduan / cipher
Last active August 29, 2015 14:17
Cipher
function VigenèreAutokeyCipher(key, abc) {
this.keyStore = '';
this.encode = function (str) {
var box = [abc];
this.keyStore = key;
for(var k in str){
this.keyStore += abc.indexOf(str[k]) < 0 ? '' : str[k];
}
for(var i in abc){
box.push(abc.split(abc[i])[1] + abc.split(abc[i])[0] + abc[i]);