os/security/crypto/weakcryptospi/test/tcryptospi/src/plugincharschecker.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 *
    16 */
    17 
    18 
    19 
    20 
    21 /**
    22  @file
    23  @internalTechnology
    24 */
    25 #if (!defined __PLUGINCHARSCHECKER_H__)
    26 #define __PLUGINCHARSCHECKER_H__
    27 
    28 #include <cryptospi/plugincharacteristics.h>
    29 #include <cryptospi/extendedcharacteristics.h>
    30 #include "te_cryptospiconversion.h"
    31 
    32 class CPluginCharsChecker : public CBase
    33 	{
    34 public:
    35 
    36 	static CPluginCharsChecker* NewL();
    37 	static CPluginCharsChecker* NewLC();
    38 	
    39 	~CPluginCharsChecker();
    40 	
    41 	TBool checkCommonCharacteristics(const CryptoSpi::TCommonCharacteristics* aCharacteristics,
    42 										TVariantPtrC aInterfaceUid,
    43 										TVariantPtrC aAlgorithmUid,
    44 										TVariantPtrC aImplementationUid,
    45 										TVariantPtrC aCreatorName,
    46 										TBool aFIPSApproved,
    47 										TBool aHardwareSupported,
    48 										TInt aMaxConcurrencySupported,
    49 										TVariantPtrC aAlgorithmName,
    50 										TInt aLatency,
    51 										TInt aThroughput,
    52 										TPtrC& aErrorMessage);
    53 									
    54 	TBool checkSymmetricCharacteristics(const CryptoSpi::TSymmetricCipherCharacteristics* aCharacteristics,
    55 										TInt aSymmetricMaxKeyLength,
    56 										TInt aSymmetricBlockSize,
    57 										TVariantPtrC aSymmetricPaddingModes,
    58 										TInt aSymmetricPaddingModeNum,
    59 										TVariantPtrC aSymmetricOperationModes,
    60 										TInt aSymmetricOperationModeNum,
    61 										TInt aSymmetricKeySupportMode,
    62 										TPtrC& aErrorMessage);
    63 									
    64 	TBool checkAsymmetricCharacteristics(const CryptoSpi::TAsymmetricCipherCharacteristics* aCharacteristics,
    65 										TInt aAsymmetricMaxKeyLength,
    66 										TVariantPtrC aAsymmetricPaddingModes,
    67 										TInt aAsymmetricPaddingModeNum,
    68 										TInt aAsymmetricKeySupportMode,
    69 										TPtrC& aErrorMessage);
    70 									
    71 	TBool checkHashCharacteristics(const CryptoSpi::THashCharacteristics* aCharacteristics,
    72 										TInt aBlockSize,
    73 										TInt aOutputSize,
    74 										TVariantPtrC aHashOperationModes,
    75 										TInt aHashOperationModeNum,
    76 										TPtrC& aErrorMessage);
    77 #ifdef SYMBIAN_SDP_IPSEC_VOIP_SUPPORT	
    78 	TBool checkMacCharacteristics(const CryptoSpi::TMacCharacteristics* aCharacteristics,
    79 									TVariantPtrC aMacMode, 
    80 									TPtrC& aErrorMessage);
    81 #endif
    82 									
    83 	TBool checkRandomCharacteristics(const CryptoSpi::TRandomCharacteristics* aCharacteristics,
    84 										TInt aRandomBlockingMode,
    85 										TPtrC& aErrorMessage);
    86 										
    87 	TBool checkAsymSignatureCharacteristics(const CryptoSpi::TAsymmetricSignatureCharacteristics* aCharacteristics,
    88 										TInt aAsymSignMaxKeyLength,
    89 										TVariantPtrC aAsymSignPaddingModes,
    90 										TInt aAsymSignPaddingModeNum,
    91 										TInt aAsymSignKeySupportMode,
    92 										TPtrC& aErrorMessage);
    93 										
    94 	TBool checkAsymKeypairGenCharacteristics(const CryptoSpi::TAsymmetricKeypairGeneratorCharacteristics* aCharacteristics,
    95 										TInt aAsymKeypairGenMaxKeyLength,
    96 										TPtrC& aErrorMessage);
    97 										
    98 	TBool checkSelectedPlugin(const CryptoSpi::TCharacteristics* aCharacteristics,
    99 												TVariantPtrC aAlgorithmUid,
   100 												TVariantPtrC aImplementationUid,
   101 												TPtrC& aErrorMessage);
   102 
   103 private:
   104 
   105 	CPluginCharsChecker();
   106 	};
   107 
   108 
   109 #endif