millermedeiros/Hasher — pull request #59 by mwoc (2013-10-29 14:44:11+00:00)
Title: Using hasher with already percent-encoded strings - pull request

Hi,

Based on the discussion in https://github.com/millermedeiros/Hasher/issues/56 I've come up with a strategy for using Hasher with already percent-encoded strings.

Rather than exposing this as separate functions on the API, it seemed more logical to use a boolean config option to toggle encode/decode, as otherwise a great deal of functions would have to be duplicated and the inner workings would need much more special-casing (setHash is also called internally).

I've added some passing tests as well, which might have to be expanded a bit but at least show that the code changes function.

Hope you like these changes. Have a nice day!

/maarten