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

Side by Side Diff: nss/lib/softoken/lowpbe.h

Issue 1843333003: Update NSPR to 4.12 and NSS to 3.23 on iOS (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss.git@master
Patch Set: Created 4 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
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 4
5 #ifndef _SECPKCS5_H_ 5 #ifndef _SECPKCS5_H_
6 #define _SECPKCS5_H_ 6 #define _SECPKCS5_H_
7 7
8 #include "plarena.h" 8 #include "plarena.h"
9 #include "secitem.h" 9 #include "secitem.h"
10 #include "seccomon.h" 10 #include "seccomon.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 */ 70 */
71 NSSPKCS5PBEParameter * 71 NSSPKCS5PBEParameter *
72 nsspkcs5_AlgidToParam(SECAlgorithmID *algid); 72 nsspkcs5_AlgidToParam(SECAlgorithmID *algid);
73 73
74 /* 74 /*
75 * Convert an Algorithm ID to a PBE Param. 75 * Convert an Algorithm ID to a PBE Param.
76 * NOTE: this does not suppport PKCS 5 v2 because it's only used for the 76 * NOTE: this does not suppport PKCS 5 v2 because it's only used for the
77 * keyDB which only support PKCS 5 v1, PFX, and PKCS 12. 77 * keyDB which only support PKCS 5 v1, PFX, and PKCS 12.
78 */ 78 */
79 NSSPKCS5PBEParameter * 79 NSSPKCS5PBEParameter *
80 nsspkcs5_NewParam(SECOidTag alg, SECItem *salt, int iterator); 80 nsspkcs5_NewParam(SECOidTag alg, HASH_HashType hashType, SECItem *salt,
81 int iterationCount);
81 82
82 83
83 /* Encrypt/Decrypt data using password based encryption. 84 /* Encrypt/Decrypt data using password based encryption.
84 * algid is the PBE algorithm identifier, 85 * algid is the PBE algorithm identifier,
85 * pwitem is the password, 86 * pwitem is the password,
86 * src is the source for encryption/decryption, 87 * src is the source for encryption/decryption,
87 * encrypt is PR_TRUE for encryption, PR_FALSE for decryption. 88 * encrypt is PR_TRUE for encryption, PR_FALSE for decryption.
88 * The key and iv are generated based upon PKCS #5 then the src 89 * The key and iv are generated based upon PKCS #5 then the src
89 * is either encrypted or decrypted. If an error occurs, NULL 90 * is either encrypted or decrypted. If an error occurs, NULL
90 * is returned, otherwise the ciphered contents is returned. 91 * is returned, otherwise the ciphered contents is returned.
91 */ 92 */
92 extern SECItem * 93 extern SECItem *
93 nsspkcs5_CipherData(NSSPKCS5PBEParameter *, SECItem *pwitem, 94 nsspkcs5_CipherData(NSSPKCS5PBEParameter *, SECItem *pwitem,
94 SECItem *src, PRBool encrypt, PRBool *update); 95 SECItem *src, PRBool encrypt, PRBool *update);
95 96
96 extern SECItem * 97 extern SECItem *
97 nsspkcs5_ComputeKeyAndIV(NSSPKCS5PBEParameter *, SECItem *pwitem, 98 nsspkcs5_ComputeKeyAndIV(NSSPKCS5PBEParameter *, SECItem *pwitem,
98 SECItem *iv, PRBool faulty3DES); 99 SECItem *iv, PRBool faulty3DES);
99 100
100 /* Destroys PBE parameter */ 101 /* Destroys PBE parameter */
101 extern void 102 extern void
102 nsspkcs5_DestroyPBEParameter(NSSPKCS5PBEParameter *param); 103 nsspkcs5_DestroyPBEParameter(NSSPKCS5PBEParameter *param);
103 104
104 HASH_HashType HASH_FromHMACOid(SECOidTag oid); 105 HASH_HashType HASH_FromHMACOid(SECOidTag oid);
105 106
106 SEC_END_PROTOS 107 SEC_END_PROTOS
107 108
108 #endif 109 #endif
OLDNEW
« no previous file with comments | « nss/lib/softoken/lowkey.c ('k') | nss/lib/softoken/lowpbe.c » ('j') | nss/lib/util/secoid.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698