First public contribution.
2 * Copyright (c) 2006-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 * Software random implementation
26 #ifndef __CRYPTOAPI_RANDOMIMPL_H__
27 #define __CRYPTOAPI_RANDOMIMPL_H__
29 #include <cryptospi/cryptoplugin.h>
30 #include <cryptospi/randomplugin.h>
32 namespace SoftwareCrypto
34 using namespace CryptoSpi;
36 NONSHARABLE_CLASS(CRandomImpl): public CBase, public MRandom
40 static CRandomImpl* NewL();
41 static CRandomImpl* NewLC();
46 void GetCharacteristicsL(const TCharacteristics*& aPluginCharacteristics);
47 const CExtendedCharacteristics* GetExtendedCharacteristicsL();
48 TAny* GetExtension(TUid aExtensionId);
49 TUid ImplementationUid() const;
52 void GenerateRandomBytesL(TDes8& aDest);
54 static CExtendedCharacteristics* CreateExtendedCharacteristicsL();
64 TUid iImplementationUid;
68 #endif // __CRYPTOAPI_RANDOMIMPL_H__