Closed Munter closed 10 years ago
Where did you get the hash 'e9hn8rxt33h8pwon' from? If I use seed 'foo' and password 'bar' on domain 'example.net' I get '3vyr0z87hs928a7l' on https://rndphrase.appspot.com. This is what the test result outputs on my machine.
Hmm that is weird, 'e9hn8rxt33h8pwon' is in the self test which passes, even though typing yields a different result. Can the old hash be a bug that you stumpled upon?
This is in fact a bug in the old implementation. The correct hash is '3vyr0z87hs928a7l'. If you look at the original self_test function r.build_generator is invoked with the seed. However in rndphrase_do - the seed is first set with set_seed. The difference is that build_generator uses the argument seed directly, whereas set_seed uses a hashed version of the seed. With the new implementation we always hash the seed (as should be).
Cool. Now, I wonder where I left off on this :)
@brinchj I've ported enough functionality for the unit tests to work.
It seems I have made a mistake while porting the code. The cubehash unit tests run fine, so I am guessing that is not where the problem lies. However there are plenty of other opportunities to introduce errors. Can you spot what I have done wrong?