Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Side by Side Diff: nss/lib/cryptohi/cryptohi.h

Issue 70673004: Update to NSS 3.15.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Update to NSS 3.15.3 Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * crypto.h - public data structures and prototypes for the crypto library 2 * crypto.h - public data structures and prototypes for the crypto library
3 * 3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public 4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 7
8 #ifndef _CRYPTOHI_H_ 8 #ifndef _CRYPTOHI_H_
9 #define _CRYPTOHI_H_ 9 #define _CRYPTOHI_H_
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 /* 57 /*
58 ** Create a new signature context used for signing a data stream. 58 ** Create a new signature context used for signing a data stream.
59 ** "alg" the signature algorithm to use (e.g. SEC_OID_RSA_WITH_MD5) 59 ** "alg" the signature algorithm to use (e.g. SEC_OID_RSA_WITH_MD5)
60 ** "privKey" the private key to use 60 ** "privKey" the private key to use
61 */ 61 */
62 extern SGNContext *SGN_NewContext(SECOidTag alg, SECKEYPrivateKey *privKey); 62 extern SGNContext *SGN_NewContext(SECOidTag alg, SECKEYPrivateKey *privKey);
63 63
64 /* 64 /*
65 ** Destroy a signature-context object 65 ** Destroy a signature-context object
66 **» "key" the object 66 **» "cx" the object
67 ** "freeit" if PR_TRUE then free the object as well as its sub-objects 67 ** "freeit" if PR_TRUE then free the object as well as its sub-objects
68 */ 68 */
69 extern void SGN_DestroyContext(SGNContext *cx, PRBool freeit); 69 extern void SGN_DestroyContext(SGNContext *cx, PRBool freeit);
70 70
71 /* 71 /*
72 ** Reset the signing context "cx" to its initial state, preparing it for 72 ** Reset the signing context "cx" to its initial state, preparing it for
73 ** another stream of data. 73 ** another stream of data.
74 */ 74 */
75 extern SECStatus SGN_Begin(SGNContext *cx); 75 extern SECStatus SGN_Begin(SGNContext *cx);
76 76
(...skipping 28 matching lines...) Expand all
105 */ 105 */
106 extern SECStatus SEC_SignData(SECItem *result, 106 extern SECStatus SEC_SignData(SECItem *result,
107 const unsigned char *buf, int len, 107 const unsigned char *buf, int len,
108 SECKEYPrivateKey *pk, SECOidTag algid); 108 SECKEYPrivateKey *pk, SECOidTag algid);
109 109
110 /* 110 /*
111 ** Sign a pre-digested block of data using private key encryption, encoding 111 ** Sign a pre-digested block of data using private key encryption, encoding
112 ** The given signature/hash algorithm. 112 ** The given signature/hash algorithm.
113 ** "result" the final signature data (memory is allocated) 113 ** "result" the final signature data (memory is allocated)
114 ** "digest" the digest to sign 114 ** "digest" the digest to sign
115 **» "pk" the private key to encrypt with 115 **» "privKey" the private key to encrypt with
116 ** "algtag" The algorithm tag to encode (need for RSA only) 116 ** "algtag" The algorithm tag to encode (need for RSA only)
117 */ 117 */
118 extern SECStatus SGN_Digest(SECKEYPrivateKey *privKey, 118 extern SECStatus SGN_Digest(SECKEYPrivateKey *privKey,
119 SECOidTag algtag, SECItem *result, SECItem *digest); 119 SECOidTag algtag, SECItem *result, SECItem *digest);
120 120
121 /* 121 /*
122 ** DER sign a single block of data using private key encryption and the 122 ** DER sign a single block of data using private key encryption and the
123 ** MD5 hashing algorithm. This routine first computes a digital signature 123 ** MD5 hashing algorithm. This routine first computes a digital signature
124 ** using SEC_SignData, then wraps it with an CERTSignedData and then der 124 ** using SEC_SignData, then wraps it with an CERTSignedData and then der
125 ** encodes the result. 125 ** encodes the result.
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 extern SECStatus VFY_VerifyDataWithAlgorithmID(const unsigned char *buf, 359 extern SECStatus VFY_VerifyDataWithAlgorithmID(const unsigned char *buf,
360 int len, const SECKEYPublicKey *key, 360 int len, const SECKEYPublicKey *key,
361 const SECItem *sig, 361 const SECItem *sig,
362 const SECAlgorithmID *algid, SECOidTag *hash, 362 const SECAlgorithmID *algid, SECOidTag *hash,
363 void *wincx); 363 void *wincx);
364 364
365 365
366 SEC_END_PROTOS 366 SEC_END_PROTOS
367 367
368 #endif /* _CRYPTOHI_H_ */ 368 #endif /* _CRYPTOHI_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698