[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using scrypt as a library
I'm guessing you meant to send this to the scrypt mailing list rather than the
tarsnap-users mailing list, so I'm replying there instead...
On 08/31/16 04:41, Thomas Tempelmann wrote:
> I like scrypt. I wanted to use it instead of the older PBKDF2 and bcrypt algos
> in my Mac application, but found that the source code only produces a cmdline
> I could not find any instructions for building a lib, which is much more
> appropriate for general use.
My general sense has been that for small libraries like this -- the core
scrypt algorithm is only a couple hundred lines of code -- it makes more
sense to simply include the scrypt source files in your project rather than
mucking about with dynamic libraries (which, alas, there is no portable way
> So, for OS X, I've now built a dylib using Xcode. It caused ony little problem
> with the declaration of "initstate" in /sha256.c/: I had to rename it to avoid
> a name clash with some darwin based function, it seemed.
Hmm. This is a bug in OS X -- it shouldn't be exposing symbols from
<stdlib.h> when I haven't included that header. But I'll change the name of
that variable to avoid problems for other people in the future.
> If anyone else is interested, I've put up the instructions
> here: http://stackoverflow.com/questions/39222759
> To the maintainers of the code: Please add an option to the makefile to build
> a lib for each supported platform. It would make using the lib easier, I'm
> sure. Or put the code up on github and allow others to contribute, so that we
> can find forks that take care of such needs, perhaps.
I think you're looking for this?
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid