equal
deleted
inserted
replaced
59 |
59 |
60 //Destructor |
60 //Destructor |
61 ~CRandomImpl(); |
61 ~CRandomImpl(); |
62 |
62 |
63 private: |
63 private: |
64 TUid iImplementationUid; |
64 TUid iImplementationUid; |
65 |
|
66 }; |
|
67 |
|
68 class TRandomImpl { |
|
69 /** |
|
70 * The user interface to the system cryptographically |
|
71 * secure random number generator. |
|
72 */ |
|
73 public: |
|
74 |
|
75 /** |
|
76 * Fills the provided buffer with secure random data up to its |
|
77 * current length, discarding any current content. |
|
78 * |
|
79 * @param aDestination The buffer in which to write the random data. |
|
80 */ |
|
81 static void Random(TDes8& aDestination); |
|
82 }; |
|
83 |
|
84 class RRandomSessionImpl : public RSessionBase |
|
85 /** |
|
86 * The client interface to the system random number generator. End |
|
87 * users should use TRandom instead of this interface. |
|
88 * |
|
89 */ |
|
90 { |
|
91 public: |
|
92 RRandomSessionImpl(); |
|
93 |
|
94 /** |
|
95 * Fills the provided buffer with secure random data up to its |
|
96 * current length, discarding any current content. |
|
97 * |
|
98 * @param aDestination The buffer in to which to write the random data |
|
99 */ |
|
100 TInt GetRandom(TDes8& aDestination); |
|
101 |
|
102 /** |
|
103 * Opens a new session with the random number server. |
|
104 */ |
|
105 void ConnectL(); |
|
106 }; |
65 }; |
107 } |
66 } |
108 |
67 |
109 #endif // __CRYPTOAPI_RANDOMIMPL_H__ |
68 #endif // __CRYPTOAPI_RANDOMIMPL_H__ |