| OLD | NEW |
| 1 /* | 1 /* |
| 2 * softoken.h - private data structures and prototypes for the softoken lib | 2 * softoken.h - private data structures and prototypes for the softoken lib |
| 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 _SOFTOKEN_H_ | 8 #ifndef _SOFTOKEN_H_ |
| 9 #define _SOFTOKEN_H_ | 9 #define _SOFTOKEN_H_ |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 extern SECStatus | 28 extern SECStatus |
| 29 RSA_HashSign(SECOidTag hashOid, NSSLOWKEYPrivateKey *key, | 29 RSA_HashSign(SECOidTag hashOid, NSSLOWKEYPrivateKey *key, |
| 30 unsigned char *sig, unsigned int *sigLen, unsigned int maxLen, | 30 unsigned char *sig, unsigned int *sigLen, unsigned int maxLen, |
| 31 const unsigned char *hash, unsigned int hashLen); | 31 const unsigned char *hash, unsigned int hashLen); |
| 32 | 32 |
| 33 extern SECStatus | 33 extern SECStatus |
| 34 RSA_HashCheckSign(SECOidTag hashOid, NSSLOWKEYPublicKey *key, | 34 RSA_HashCheckSign(SECOidTag hashOid, NSSLOWKEYPublicKey *key, |
| 35 const unsigned char *sig, unsigned int sigLen, | 35 const unsigned char *sig, unsigned int sigLen, |
| 36 const unsigned char *hash, unsigned int hashLen); | 36 const unsigned char *hash, unsigned int hashLen); |
| 37 | 37 |
| 38 #ifndef NSS_DISABLE_ECC | |
| 39 /* | |
| 40 ** pepare an ECParam structure from DEREncoded params | |
| 41 */ | |
| 42 extern SECStatus EC_FillParams(PLArenaPool *arena, | |
| 43 const SECItem *encodedParams, ECParams *params); | |
| 44 extern SECStatus EC_DecodeParams(const SECItem *encodedParams, | |
| 45 ECParams **ecparams); | |
| 46 extern SECStatus EC_CopyParams(PLArenaPool *arena, ECParams *dstParams, | |
| 47 const ECParams *srcParams); | |
| 48 #endif | |
| 49 | |
| 50 | |
| 51 /* | 38 /* |
| 52 ** Prepare a buffer for padded CBC encryption, growing to the appropriate | 39 ** Prepare a buffer for padded CBC encryption, growing to the appropriate |
| 53 ** boundary, filling with the appropriate padding. | 40 ** boundary, filling with the appropriate padding. |
| 54 ** | 41 ** |
| 55 ** blockSize must be a power of 2. | 42 ** blockSize must be a power of 2. |
| 56 ** | 43 ** |
| 57 ** We add from 1 to blockSize bytes -- we *always* grow. | 44 ** We add from 1 to blockSize bytes -- we *always* grow. |
| 58 ** The extra bytes contain the value of the length of the padding: | 45 ** The extra bytes contain the value of the length of the padding: |
| 59 ** if we have 2 bytes of padding, then the padding is "0x02, 0x02". | 46 ** if we have 2 bytes of padding, then the padding is "0x02, 0x02". |
| 60 ** | 47 ** |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 #ifndef NO_FORK_CHECK | 257 #ifndef NO_FORK_CHECK |
| 271 #define NO_FORK_CHECK | 258 #define NO_FORK_CHECK |
| 272 #endif | 259 #endif |
| 273 | 260 |
| 274 #endif | 261 #endif |
| 275 | 262 |
| 276 | 263 |
| 277 SEC_END_PROTOS | 264 SEC_END_PROTOS |
| 278 | 265 |
| 279 #endif /* _SOFTOKEN_H_ */ | 266 #endif /* _SOFTOKEN_H_ */ |
| OLD | NEW |