os/security/cryptoplugins/cryptospiplugins/test/h4drv/crypto_h4_plugin/randomimpl.h
First public contribution.
2 * Copyright (c) 2007-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.
24 #ifndef __CRYPTOAPI_RANDOMIMPL_H__
25 #define __CRYPTOAPI_RANDOMIMPL_H__
27 #include <cryptospi/cryptoplugin.h>
28 #include <cryptospi/randomplugin.h>
29 #include "cryptodriver.h"
32 #define __NOTSHARED __declspec(notshared)
39 using namespace CryptoSpi;
41 // NONSHARABLE_CLASS(CRandomImpl): public CBase, public MRandom
42 class __NOTSHARED CRandomImpl : public CBase, public MRandom
46 static CRandomImpl* NewL();
47 static CRandomImpl* NewLC();
52 void GetCharacteristicsL(const TCharacteristics*& aPluginCharacteristics);
53 const CExtendedCharacteristics* GetExtendedCharacteristicsL();
54 static CExtendedCharacteristics* StaticGetExtendedCharacteristicsL();
57 TAny* GetExtension(TUid aExtensionId);
58 TUid ImplementationUid() const;
61 void GenerateRandomBytesL(TDes8& aDest);
73 TUid iImplementationUid;
74 RCryptoDriver iCryptoDriver;
78 #endif // __CRYPTOAPI_RANDOMIMPL_H__