Update contrib.
2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
26 #ifndef __PKCS12KDF_H__
27 #define __PKCS12KDF_H__
33 Namespace class contains static functions which
34 are used to generate a key for PKCS#12 operations.
36 See Section B from PKCS 12 v1.0.
42 ID byte value used to generate (en|de)cryption key,
43 IV, or MAC key. See SB.3 of spec.
46 /** Generates a key for (en|de)cryption. */
47 EIDByteEncryptKey = 1,
48 /** Generates an initialization vector. */
50 /** Generates a key for MAC-ing. */
54 IMPORT_C static void DeriveKeyL(
55 TDes8& aKey, TIDByteType aIDType,
56 const TDesC8& aPasswd, const TDesC8& aSalt, const TUint aIterations);
57 IMPORT_C static HBufC8* GeneratePasswordLC(const TDesC& aDes);
60 static void Process6cL(TDes8& Ij, const TDesC8& B, TInt v);
65 EDKEmptyPswd = 0x10, EDKOddPswdByteCount, EDKBadNullTerminator
67 static void Panic(TPanic aPanic);
70 // not implemented - prevents instantiation
74 #endif // #ifndef __PKCS12KDF_H__