Update contrib.
2 * Copyright (c) 2003-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.
15 * This utility class provides functions to generate key identifer data from
27 #ifndef _KEYIDENTIFIERUTIL_H_
28 #define _KEYIDENTIFIERUTIL_H_
36 /** The length of a SHA-1 hash
40 const TInt KSHA1HashLengthInBytes = 20;
47 typedef TBuf8<KSHA1HashLengthInBytes> TSHA1Hash;
51 * A SHA-1 hash is also used as a key identifier.
55 typedef TSHA1Hash TKeyIdentifier;
59 * Utilities for generation of the key identifier
63 class KeyIdentifierUtil
67 * Creates a RSA key identifier using the RSAPublicKey.
69 * @param aKey The RSA encryption key
70 * @param aIdentifier key identifier
72 IMPORT_C static void RSAKeyIdentifierL(const CRSAPublicKey& aKey, TKeyIdentifier& aIdentifier);
74 * Creates a DSA key identifier using the DSAPublicKey.
76 * @param aKey The DSA encryption key
77 * @param aIdentifier key identifier
79 IMPORT_C static void DSAKeyIdentifierL(const CDSAPublicKey& aKey, TKeyIdentifier& aIdentifier);
81 * Creates a DHKeyIdentifier using the RInteger.
83 * @param aKey The DH parameter
84 * @param aIdentifier key identifier
86 IMPORT_C static void DHKeyIdentifierL(const RInteger& aKey, TKeyIdentifier& aIdentifier);