[OPEN-ILS-DEV] ***SPAM*** Re: ***SPAM*** Re: ***SPAM*** Re: SHA1 code in sha.c
Jason Stephenson
jstephenson at mvlc.org
Tue Dec 22 09:50:09 EST 2009
Quoting Mike Rylander <mrylander at gmail.com>:
>
> Using OpenSSL also means we can rid ourselves of the embedded MD5
> implementation in oils_auth, if we so choose.
I've done something similar in a personal project. I'll post some code
today that can replace
char * shahash(char *);
in sha.c
In OpenSSL's libcrypto, all hash functions are handled in the same
manner. To switch which one is used is typically just a matter of
changing a function pointer to the underlying implementation. Given
that, I propose a single function to calculate a message digest on
arbitrary data. The sha and md5 functions could be simple wrappers
around the base function.
Jason
More information about the Open-ils-dev
mailing list