deployd/deployd — pull request #343 by luto (2014-03-13 13:32:36+00:00)
Title: UserCollection: make password-hashing monkey-patch-able

This PR moves all hashing-code in [`UserCollection`](https://github.com/deployd/deployd/blob/master/lib/resources/user-collection.js) to the new functions `UC.prototype.setPassword` and `UC.prototype.checkHash`. This makes it possible to monkey-patch these functions inside a module. With this change a module can change the way passwords are hashed and verified, so migrating a existing user-database (which most likely uses a different algorithm) is possible.