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.
29 const TInt KRandomBlockSize=1024;
30 const TInt KRandomPoolSize=2048;
32 class CRandomScheduler:public CActiveScheduler
35 static TBool New(void);
36 void Error(TInt aError) const;
41 class CRandomServer : public CServer2
44 static TInt New(void);
46 CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
47 friend class CRandomSession;
50 void ConstructL(void);
52 TPtrC8 GetRandom(void);
53 CMessageDigest* Hash(void) const;
54 static TInt Tick(TAny* aPointer);
60 CMessageDigest* iHash;
64 class CRandomSession : public CSession2
67 enum { KRandomRequest };
68 static CRandomSession* NewL(CRandomServer* aServer);
69 ~CRandomSession(void);
70 void ServiceL(const RMessage2& aMessage);
72 TInt FillBuffer(const RMessage2& aMessage);
73 CRandomServer* iServer;
74 CRandomSession(CRandomServer* aServer);
77 #endif // RANDSVRIMPL_H