Hi All

I am attempting to make a NodeJS addon for the scrypt library 
(http://www.tarsnap.com/scrypt.html). I have downloaded the source code, 
and compiled it, and it works fine. In order to get some experience in 
node-gyp, wrote a node-gyp script to replace the Makefile, and again, 
everything works.

The problem comes in when I try incorporate the scrypt into a Node addon. 
Note that scrypt is a C library. Whenever I call the scrypt function, it 
always results in a segmentation fault. I traced the error to the function 
`SHA256_Update`. It is defined by the scrypt author, yet it is not being 
called. I guess it is being linked to another `SHA256_Update` function, and 
hence the `SHA256_Update` that the author wrote is not being called.

I am at my wits end trying to figure out what is wrong. So *PLEASE* can 
anyone help me. Specifically, I have the following questions:

   1. I have heard about node_g, yet I can't find any source to obtain it. 
   Please can someone tell me where to get it?
   2. Scrypt is authored in C, so should I create a `static_library` in 
   gyp, or should I compile it together with my main addon file.
   3. I am forced to wrap my header file for scrypt in `extern "c"` for 
   correctly linking. This is correct, isn't it?
   4. How can I ensure that the correct `SHA256_Update` is executed. And if 
   this is not being executed, what is?

Any help would be greatly appreciated. I hope to give this to the community 
before xmas :)

Barry

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to