On 3/22/2011 10:29 PM, Crypto User wrote:
Hi ,
I am trying to create APIS which will provide Hashing functionality
to end user. I am using NSS to provide this on Linux.
I was trying to find the correct APIs in NSS to provide this
functionality and I was confused.
There seem to be different APIs.
E.g CreateDigestContext(SECOidTag hashAlg) and related APIs in
https://developer.mozilla.org/en/NSS/Cryptography_functions
or
MD5_Begin() and related hash API from
http://mxr.mozilla.org/security/source/security/nss/lib/freebl/md5.c
and other hashing alg files.
Which one should be used ?
Thanks
Probably a good example of how to use NSS api is to look at the XPCOM
wrappers here:
http://mxr.mozilla.org/mozilla-central/source/security/manager/ssl/src/nsNSSComponent.cpp#2609
Just check HASH_* function calls.
Also this header might tell you what you need:
http://mxr.mozilla.org/mozilla-central/source/security/nss/lib/freebl/sechash.h#67
-hb-
--
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto