First public contribution.
2 * Copyright (c) 1998-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.
19 #ifndef __TVECTORUTILS_H__
20 #define __TVECTORUTILS_H__
23 #include "asymmetrickeys.h"
24 #include "asymmetric.h"
28 * Defines static utility methods used by the vector tests.
35 /** Parse a hex string and return a new RInteger. */
36 static RInteger ParseIntegerL(const TDesC8& aDes);
38 /** Parse a hex string and return a new descriptor containing the binary data. */
39 static HBufC8* ParseBinaryL(const TDesC8& aDes);
41 /** Return a new descriptor containing the hex representation of an Integer. */
42 static TDesC* PrintIntegerL(const TInteger& aInt);
44 /** Return a new descriptor containing the hex representation of a binary string. */
45 static TDesC* PrintBinaryL(const TDesC8& aData);
47 /** Parse a string containg either "ETrue" or "EFalse" and return a TBool. */
48 static TBool ParseBoolL(const TDesC8& aDes);
50 /** Create an RSA public key from from action data. */
51 static CRSAPublicKey* ReadRSAPublicKeyL(const TDesC8& aData);
53 /** Create an RSA private key from from action data. */
54 static CRSAPrivateKeyStandard* ReadRSAPrivateKeyL(const TDesC8& aData);
56 /** Create an RSA private key from by CRT */
57 static CRSAPrivateKeyCRT* ReadRSAPrivateKeyCRTL(const TDesC8& aData);
59 /** Create a DSA public key from from action data. */
60 static CDSAPublicKey* ReadDSAPublicKeyL(const TDesC8& aData);
62 /** Create a DSA private key from from action data. */
63 static CDSAPrivateKey* ReadDSAPrivateKeyL(const TDesC8& aData);
65 /** Create a DSA signature from from action data. */
66 static CDSASignature* ReadDSASignatureL(const TDesC8& aData);