On Fri, Oct 5, 2012 at 8:53 AM, Jim Klo <[email protected]> wrote:
> What does jsSHA look like? Does it export something? I think CommonJS uses
> exports vs export.
Oops, typo, googd catch. However, it changes nothing. I think the
problem is related to how jsSHA needs to instantiate a new object
first. From the docs:
"Instantiate a new jsSHA object with your string to be hashed and its
format (HEX or TEXT) as the parameters. Then, call getHash with the
desired hash variant (SHA-1, SHA-224, SHA-256, SHA-384, or SHA-512)
and output type (HEX or B64)
...
var shaObj = new jsSHA("This is a Test", "TEXT");
var hash = shaObj.getHash("SHA-512", "HEX");"
jsSHA is on Github at:
https://github.com/Caligatio/jsSHA
Is it possible that CommonJS does not allow for this kind of module
usage or is there a workaround?
Thanks,
Marcus