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

Side by Side Diff: nss/lib/freebl/blapi.h

Issue 13898013: Update NSS to NSS_3_15_BETA2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Update NSS versions and tag in README.chromium Created 7 years, 8 months 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 /* $Id$ */ 7 /* $Id$ */
8 8
9 #ifndef _BLAPI_H_ 9 #ifndef _BLAPI_H_
10 #define _BLAPI_H_ 10 #define _BLAPI_H_
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 ** "cx" the context 868 ** "cx" the context
869 ** "digest" where the 16 bytes of digest data are stored 869 ** "digest" where the 16 bytes of digest data are stored
870 ** "digestLen" where the digest length (16) is stored 870 ** "digestLen" where the digest length (16) is stored
871 ** "maxDigestLen" the maximum amount of data that can ever be 871 ** "maxDigestLen" the maximum amount of data that can ever be
872 ** stored in "digest" 872 ** stored in "digest"
873 */ 873 */
874 extern void MD5_End(MD5Context *cx, unsigned char *digest, 874 extern void MD5_End(MD5Context *cx, unsigned char *digest,
875 unsigned int *digestLen, unsigned int maxDigestLen); 875 unsigned int *digestLen, unsigned int maxDigestLen);
876 876
877 /* 877 /*
878 ** Export the raw state of the MD5 hash without appending the standard padding 878 ** Export the current state of the MD5 hash without appending the standard
879 ** and length bytes. Produce the digested results in "digest" 879 ** padding and length bytes. Produce the digested results in "digest"
880 ** "cx" the context 880 ** "cx" the context
881 ** "digest" where the 16 bytes of digest data are stored 881 ** "digest" where the 16 bytes of digest data are stored
882 ** "digestLen" where the digest length (16) is stored (optional) 882 ** "digestLen" where the digest length (16) is stored (optional)
883 ** "maxDigestLen" the maximum amount of data that can ever be 883 ** "maxDigestLen" the maximum amount of data that can ever be
884 ** stored in "digest" 884 ** stored in "digest"
885 */ 885 */
886 extern void MD5_EndRaw(MD5Context *cx, unsigned char *digest, 886 extern void MD5_EndRaw(MD5Context *cx, unsigned char *digest,
887 unsigned int *digestLen, unsigned int maxDigestLen); 887 unsigned int *digestLen, unsigned int maxDigestLen);
888 888
889 /* 889 /*
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 ** "digest" where the 16 bytes of digest data are stored 1037 ** "digest" where the 16 bytes of digest data are stored
1038 ** "digestLen" where the digest length (20) is stored 1038 ** "digestLen" where the digest length (20) is stored
1039 ** "maxDigestLen" the maximum amount of data that can ever be 1039 ** "maxDigestLen" the maximum amount of data that can ever be
1040 ** stored in "digest" 1040 ** stored in "digest"
1041 */ 1041 */
1042 extern void SHA1_End(SHA1Context *cx, unsigned char *digest, 1042 extern void SHA1_End(SHA1Context *cx, unsigned char *digest,
1043 unsigned int *digestLen, unsigned int maxDigestLen); 1043 unsigned int *digestLen, unsigned int maxDigestLen);
1044 1044
1045 /* 1045 /*
1046 ** Export the current state of the SHA-1 hash without appending the standard 1046 ** Export the current state of the SHA-1 hash without appending the standard
1047 ** padding and length. Produce the digested results in "digest" 1047 ** padding and length bytes. Produce the digested results in "digest"
1048 ** "cx" the context 1048 ** "cx" the context
1049 **» "digest" where the 16 bytes of digest data are stored 1049 **» "digest" where the 20 bytes of digest data are stored
1050 ** "digestLen" where the digest length (20) is stored (optional) 1050 ** "digestLen" where the digest length (20) is stored (optional)
1051 ** "maxDigestLen" the maximum amount of data that can ever be 1051 ** "maxDigestLen" the maximum amount of data that can ever be
1052 ** stored in "digest" 1052 ** stored in "digest"
1053 */ 1053 */
1054 extern void SHA1_EndRaw(SHA1Context *cx, unsigned char *digest, 1054 extern void SHA1_EndRaw(SHA1Context *cx, unsigned char *digest,
1055 unsigned int *digestLen, unsigned int maxDigestLen); 1055 unsigned int *digestLen, unsigned int maxDigestLen);
1056 1056
1057 /* 1057 /*
1058 ** trace the intermediate state info of the SHA1 hash. 1058 ** trace the intermediate state info of the SHA1 hash.
1059 */ 1059 */
(...skipping 25 matching lines...) Expand all
1085 1085
1086 /******************************************/ 1086 /******************************************/
1087 1087
1088 extern SHA224Context *SHA224_NewContext(void); 1088 extern SHA224Context *SHA224_NewContext(void);
1089 extern void SHA224_DestroyContext(SHA224Context *cx, PRBool freeit); 1089 extern void SHA224_DestroyContext(SHA224Context *cx, PRBool freeit);
1090 extern void SHA224_Begin(SHA224Context *cx); 1090 extern void SHA224_Begin(SHA224Context *cx);
1091 extern void SHA224_Update(SHA224Context *cx, const unsigned char *input, 1091 extern void SHA224_Update(SHA224Context *cx, const unsigned char *input,
1092 unsigned int inputLen); 1092 unsigned int inputLen);
1093 extern void SHA224_End(SHA224Context *cx, unsigned char *digest, 1093 extern void SHA224_End(SHA224Context *cx, unsigned char *digest,
1094 unsigned int *digestLen, unsigned int maxDigestLen); 1094 unsigned int *digestLen, unsigned int maxDigestLen);
1095 /*
1096 ** Export the current state of the SHA-224 hash without appending the standard
1097 ** padding and length bytes. Produce the digested results in "digest"
1098 ** "cx" the context
1099 ** "digest" where the 28 bytes of digest data are stored
1100 ** "digestLen" where the digest length (28) is stored (optional)
1101 ** "maxDigestLen" the maximum amount of data that can ever be
1102 ** stored in "digest"
1103 */
1095 extern void SHA224_EndRaw(SHA224Context *cx, unsigned char *digest, 1104 extern void SHA224_EndRaw(SHA224Context *cx, unsigned char *digest,
1096 unsigned int *digestLen, unsigned int maxDigestLen); 1105 unsigned int *digestLen, unsigned int maxDigestLen);
1097 extern SECStatus SHA224_HashBuf(unsigned char *dest, const unsigned char *src, 1106 extern SECStatus SHA224_HashBuf(unsigned char *dest, const unsigned char *src,
1098 uint32 src_length); 1107 uint32 src_length);
1099 extern SECStatus SHA224_Hash(unsigned char *dest, const char *src); 1108 extern SECStatus SHA224_Hash(unsigned char *dest, const char *src);
1100 extern void SHA224_TraceState(SHA224Context *cx); 1109 extern void SHA224_TraceState(SHA224Context *cx);
1101 extern unsigned int SHA224_FlattenSize(SHA224Context *cx); 1110 extern unsigned int SHA224_FlattenSize(SHA224Context *cx);
1102 extern SECStatus SHA224_Flatten(SHA224Context *cx,unsigned char *space); 1111 extern SECStatus SHA224_Flatten(SHA224Context *cx,unsigned char *space);
1103 extern SHA224Context * SHA224_Resurrect(unsigned char *space, void *arg); 1112 extern SHA224Context * SHA224_Resurrect(unsigned char *space, void *arg);
1104 extern void SHA224_Clone(SHA224Context *dest, SHA224Context *src); 1113 extern void SHA224_Clone(SHA224Context *dest, SHA224Context *src);
1105 1114
1106 /******************************************/ 1115 /******************************************/
1107 1116
1108 extern SHA256Context *SHA256_NewContext(void); 1117 extern SHA256Context *SHA256_NewContext(void);
1109 extern void SHA256_DestroyContext(SHA256Context *cx, PRBool freeit); 1118 extern void SHA256_DestroyContext(SHA256Context *cx, PRBool freeit);
1110 extern void SHA256_Begin(SHA256Context *cx); 1119 extern void SHA256_Begin(SHA256Context *cx);
1111 extern void SHA256_Update(SHA256Context *cx, const unsigned char *input, 1120 extern void SHA256_Update(SHA256Context *cx, const unsigned char *input,
1112 unsigned int inputLen); 1121 unsigned int inputLen);
1113 extern void SHA256_End(SHA256Context *cx, unsigned char *digest, 1122 extern void SHA256_End(SHA256Context *cx, unsigned char *digest,
1114 unsigned int *digestLen, unsigned int maxDigestLen); 1123 unsigned int *digestLen, unsigned int maxDigestLen);
1124 /*
1125 ** Export the current state of the SHA-256 hash without appending the standard
1126 ** padding and length bytes. Produce the digested results in "digest"
1127 ** "cx" the context
1128 ** "digest" where the 32 bytes of digest data are stored
1129 ** "digestLen" where the digest length (32) is stored (optional)
1130 ** "maxDigestLen" the maximum amount of data that can ever be
1131 ** stored in "digest"
1132 */
1115 extern void SHA256_EndRaw(SHA256Context *cx, unsigned char *digest, 1133 extern void SHA256_EndRaw(SHA256Context *cx, unsigned char *digest,
1116 unsigned int *digestLen, unsigned int maxDigestLen); 1134 unsigned int *digestLen, unsigned int maxDigestLen);
1117 extern SECStatus SHA256_HashBuf(unsigned char *dest, const unsigned char *src, 1135 extern SECStatus SHA256_HashBuf(unsigned char *dest, const unsigned char *src,
1118 uint32 src_length); 1136 uint32 src_length);
1119 extern SECStatus SHA256_Hash(unsigned char *dest, const char *src); 1137 extern SECStatus SHA256_Hash(unsigned char *dest, const char *src);
1120 extern void SHA256_TraceState(SHA256Context *cx); 1138 extern void SHA256_TraceState(SHA256Context *cx);
1121 extern unsigned int SHA256_FlattenSize(SHA256Context *cx); 1139 extern unsigned int SHA256_FlattenSize(SHA256Context *cx);
1122 extern SECStatus SHA256_Flatten(SHA256Context *cx,unsigned char *space); 1140 extern SECStatus SHA256_Flatten(SHA256Context *cx,unsigned char *space);
1123 extern SHA256Context * SHA256_Resurrect(unsigned char *space, void *arg); 1141 extern SHA256Context * SHA256_Resurrect(unsigned char *space, void *arg);
1124 extern void SHA256_Clone(SHA256Context *dest, SHA256Context *src); 1142 extern void SHA256_Clone(SHA256Context *dest, SHA256Context *src);
1125 1143
1126 /******************************************/ 1144 /******************************************/
1127 1145
1128 extern SHA512Context *SHA512_NewContext(void); 1146 extern SHA512Context *SHA512_NewContext(void);
1129 extern void SHA512_DestroyContext(SHA512Context *cx, PRBool freeit); 1147 extern void SHA512_DestroyContext(SHA512Context *cx, PRBool freeit);
1130 extern void SHA512_Begin(SHA512Context *cx); 1148 extern void SHA512_Begin(SHA512Context *cx);
1131 extern void SHA512_Update(SHA512Context *cx, const unsigned char *input, 1149 extern void SHA512_Update(SHA512Context *cx, const unsigned char *input,
1132 unsigned int inputLen); 1150 unsigned int inputLen);
1151 /*
1152 ** Export the current state of the SHA-512 hash without appending the standard
1153 ** padding and length bytes. Produce the digested results in "digest"
1154 ** "cx" the context
1155 ** "digest" where the 64 bytes of digest data are stored
1156 ** "digestLen" where the digest length (64) is stored (optional)
1157 ** "maxDigestLen" the maximum amount of data that can ever be
1158 ** stored in "digest"
1159 */
1133 extern void SHA512_EndRaw(SHA512Context *cx, unsigned char *digest, 1160 extern void SHA512_EndRaw(SHA512Context *cx, unsigned char *digest,
1134 unsigned int *digestLen, unsigned int maxDigestLen); 1161 unsigned int *digestLen, unsigned int maxDigestLen);
1135 extern void SHA512_End(SHA512Context *cx, unsigned char *digest, 1162 extern void SHA512_End(SHA512Context *cx, unsigned char *digest,
1136 unsigned int *digestLen, unsigned int maxDigestLen); 1163 unsigned int *digestLen, unsigned int maxDigestLen);
1137 extern SECStatus SHA512_HashBuf(unsigned char *dest, const unsigned char *src, 1164 extern SECStatus SHA512_HashBuf(unsigned char *dest, const unsigned char *src,
1138 uint32 src_length); 1165 uint32 src_length);
1139 extern SECStatus SHA512_Hash(unsigned char *dest, const char *src); 1166 extern SECStatus SHA512_Hash(unsigned char *dest, const char *src);
1140 extern void SHA512_TraceState(SHA512Context *cx); 1167 extern void SHA512_TraceState(SHA512Context *cx);
1141 extern unsigned int SHA512_FlattenSize(SHA512Context *cx); 1168 extern unsigned int SHA512_FlattenSize(SHA512Context *cx);
1142 extern SECStatus SHA512_Flatten(SHA512Context *cx,unsigned char *space); 1169 extern SECStatus SHA512_Flatten(SHA512Context *cx,unsigned char *space);
1143 extern SHA512Context * SHA512_Resurrect(unsigned char *space, void *arg); 1170 extern SHA512Context * SHA512_Resurrect(unsigned char *space, void *arg);
1144 extern void SHA512_Clone(SHA512Context *dest, SHA512Context *src); 1171 extern void SHA512_Clone(SHA512Context *dest, SHA512Context *src);
1145 1172
1146 /******************************************/ 1173 /******************************************/
1147 1174
1148 extern SHA384Context *SHA384_NewContext(void); 1175 extern SHA384Context *SHA384_NewContext(void);
1149 extern void SHA384_DestroyContext(SHA384Context *cx, PRBool freeit); 1176 extern void SHA384_DestroyContext(SHA384Context *cx, PRBool freeit);
1150 extern void SHA384_Begin(SHA384Context *cx); 1177 extern void SHA384_Begin(SHA384Context *cx);
1151 extern void SHA384_Update(SHA384Context *cx, const unsigned char *input, 1178 extern void SHA384_Update(SHA384Context *cx, const unsigned char *input,
1152 unsigned int inputLen); 1179 unsigned int inputLen);
1153 extern void SHA384_End(SHA384Context *cx, unsigned char *digest, 1180 extern void SHA384_End(SHA384Context *cx, unsigned char *digest,
1154 unsigned int *digestLen, unsigned int maxDigestLen); 1181 unsigned int *digestLen, unsigned int maxDigestLen);
1182 /*
1183 ** Export the current state of the SHA-384 hash without appending the standard
1184 ** padding and length bytes. Produce the digested results in "digest"
1185 ** "cx" the context
1186 ** "digest" where the 48 bytes of digest data are stored
1187 ** "digestLen" where the digest length (48) is stored (optional)
1188 ** "maxDigestLen" the maximum amount of data that can ever be
1189 ** stored in "digest"
1190 */
1155 extern void SHA384_EndRaw(SHA384Context *cx, unsigned char *digest, 1191 extern void SHA384_EndRaw(SHA384Context *cx, unsigned char *digest,
1156 unsigned int *digestLen, unsigned int maxDigestLen); 1192 unsigned int *digestLen, unsigned int maxDigestLen);
1157 extern SECStatus SHA384_HashBuf(unsigned char *dest, const unsigned char *src, 1193 extern SECStatus SHA384_HashBuf(unsigned char *dest, const unsigned char *src,
1158 uint32 src_length); 1194 uint32 src_length);
1159 extern SECStatus SHA384_Hash(unsigned char *dest, const char *src); 1195 extern SECStatus SHA384_Hash(unsigned char *dest, const char *src);
1160 extern void SHA384_TraceState(SHA384Context *cx); 1196 extern void SHA384_TraceState(SHA384Context *cx);
1161 extern unsigned int SHA384_FlattenSize(SHA384Context *cx); 1197 extern unsigned int SHA384_FlattenSize(SHA384Context *cx);
1162 extern SECStatus SHA384_Flatten(SHA384Context *cx,unsigned char *space); 1198 extern SECStatus SHA384_Flatten(SHA384Context *cx,unsigned char *space);
1163 extern SHA384Context * SHA384_Resurrect(unsigned char *space, void *arg); 1199 extern SHA384Context * SHA384_Resurrect(unsigned char *space, void *arg);
1164 extern void SHA384_Clone(SHA384Context *dest, SHA384Context *src); 1200 extern void SHA384_Clone(SHA384Context *dest, SHA384Context *src);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 PRBool BLAPI_VerifySelf(const char *name); 1405 PRBool BLAPI_VerifySelf(const char *name);
1370 1406
1371 /*********************************************************************/ 1407 /*********************************************************************/
1372 extern const SECHashObject * HASH_GetRawHashObject(HASH_HashType hashType); 1408 extern const SECHashObject * HASH_GetRawHashObject(HASH_HashType hashType);
1373 1409
1374 extern void BL_SetForkState(PRBool forked); 1410 extern void BL_SetForkState(PRBool forked);
1375 1411
1376 SEC_END_PROTOS 1412 SEC_END_PROTOS
1377 1413
1378 #endif /* _BLAPI_H_ */ 1414 #endif /* _BLAPI_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698