equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2006-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 * hashshim.h |
|
16 * hash shim classes definition |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 /** |
|
22 @file |
|
23 @internalComponent |
|
24 @released |
|
25 */ |
|
26 |
|
27 #ifndef __HASHSHIM_H__ |
|
28 #define __HASHSHIM_H__ |
|
29 |
|
30 #include <e32def.h> |
|
31 #include <hash.h> |
|
32 #include <cryptospi/cryptohashapi.h> |
|
33 #include "sha1impl.h" |
|
34 |
|
35 // |
|
36 // SHA1 shim class |
|
37 // |
|
38 |
|
39 NONSHARABLE_CLASS(CSHA1Shim) : public CMessageDigest |
|
40 { |
|
41 public: |
|
42 static CSHA1Shim* NewL(); |
|
43 static CSHA1Shim* NewLC(); |
|
44 ~CSHA1Shim(); |
|
45 CMessageDigest* CopyL(); |
|
46 TInt BlockSize(); |
|
47 TInt HashSize() ; |
|
48 void Update(const TDesC8& aMessage); |
|
49 TPtrC8 Final(const TDesC8& aMessage); |
|
50 TPtrC8 Final(); |
|
51 void Reset(); |
|
52 TPtrC8 Hash(const TDesC8& aMessage); |
|
53 CMessageDigest* ReplicateL(); |
|
54 void RestoreState(); |
|
55 void StoreState(); |
|
56 |
|
57 private: |
|
58 CSHA1Shim(); |
|
59 void ConstructL(); |
|
60 |
|
61 private: |
|
62 SoftwareCrypto::CSHA1Impl* iHashImpl; |
|
63 }; |
|
64 |
|
65 #endif |