New NSS Sample Code
The collection of sample code here demonstrates how NSS can be used for cryptographic operations, certificate handling, SSL, etc. It also demonstrates some best practices in the application of cryptography.
These new examples are still a work in progress. See https://bugzilla.mozilla.org/show_bug.cgi?id=490238
You are welcome to download the new samples via:
hg clone https://hg.mozilla.org/projects/nss; cd nss; hg update SAMPLES_BRANCH
These are the new examples
- Sample Code 1: Hashing
- Sample Code 2: Init NSS database
- Sample Code 3: Encrypt/Decrypt and Mac Using Token
- Sample Code 4: Encrypt/Decrypt and Mac Using Session Objects
- Sample Code 5: Encrypt/Decrypt/MAC Output Public Key as a CSR
- Sample Code 6: Encrypt/Decrypt/MAC Generating a PKCS#11 CSR
This is common code used by the new examples
Thanks are due to Shailendra Jain, Mozilla Community member, who is the principal author of these samples.