add hashAlgorithm to options; move hash to object instance property#16
add hashAlgorithm to options; move hash to object instance property#16buzcarter wants to merge 2 commits intopillarjs:masterfrom
Conversation
|
A security pal pointed out that sha1 has myriad security concerns, was asked to use a different algorithm. Fortunately, it's an easy task to extend the initialization Node crypto supports anything available in its native OS : https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm_options
|
2cc630a to
cf459a7
Compare
| */ | ||
|
|
||
| function hash (str) { | ||
| Tokens.prototype.hash = function hash (str) { |
There was a problem hiding this comment.
this is the biggest change: moving this method from a private "helper" to a public class method, all necessitated by needing access to this.hashAlgorithm.
Is the naming convention to prepend an underscore to indicate private? (which would be great, IMHO -- _hash)
No description provided.