RndPhrase / RndPhrase.js

Javascript module to auto generate secure passwords
2 stars 0 forks source link

Hash generator #8

Closed rlindsgaard closed 10 years ago

rlindsgaard commented 10 years ago

Implement a generator that invoked with () consecutively yields new results based on the old one. See https://groups.google.com/forum/#!topic/rndphrase/51__1Sc8Eso for details or

function init(i) {
    var j = 0;
    var generator = function() {
            j = i+j;
            return j;
    }
    return generator
}

var f = init(2);

for(var i=0; i < 10; i++) {
    console.log(f())
}
rlindsgaard commented 10 years ago

I am not completely satisfied with this solution. Ideas are welcome

rlindsgaard commented 10 years ago

https://github.com/RndPhrase/RndPhrase.js/pull/12 is much more nice

rlindsgaard commented 10 years ago

Now we can close it