equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of the License "Eclipse Public License v1.0" |
5 * under the terms of the License "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
21 @file |
21 @file |
22 @released |
22 @released |
23 @internalTechnology |
23 @internalTechnology |
24 */ |
24 */ |
25 |
25 |
|
26 #ifndef __SECUTILS_H__ |
|
27 #define __SECUTILS_H__ |
|
28 |
26 #include <e32std.h> |
29 #include <e32std.h> |
27 #include <f32file.h> |
30 #include <f32file.h> |
28 #include <e32uid.h> |
31 #include <e32uid.h> |
|
32 #include "swi/swiutils.h" |
29 |
33 |
30 namespace Swi |
34 namespace Swi |
31 { |
35 { |
32 |
36 |
33 /** |
37 /** |
81 * @param aName Descriptor containing data to hash |
85 * @param aName Descriptor containing data to hash |
82 * @return Pointer to allocated buffer, which will be owned by the |
86 * @return Pointer to allocated buffer, which will be owned by the |
83 * caller. |
87 * caller. |
84 */ |
88 */ |
85 IMPORT_C static HBufC* HexHashL(const TDesC& aName); |
89 IMPORT_C static HBufC* HexHashL(const TDesC& aName); |
|
90 |
|
91 /** |
|
92 * Appends a Uid to the buffer and publishes the same. |
|
93 * @param aBuf The buffer containing the list of Uids that is published. |
|
94 * @param aUid The UID of the package which has been processed. |
|
95 */ |
|
96 IMPORT_C static TInt PublishPackageUid(TUid aUid, TUid (&aUidList)[KMaxUidCount]); |
|
97 |
|
98 /** |
|
99 * Checks if the given Uid is present in the buffer that contains the list of Uids published. |
|
100 * @param aBuf The buffer containing the list of Uids that is published. |
|
101 * @param aUid The UID of the package which to be verified. |
|
102 */ |
|
103 IMPORT_C static TBool IsPackageUidPresent(TUid aUid, const TUid (&aUidList)[KMaxUidCount]); |
86 }; |
104 }; |
87 |
105 |
88 inline TBool SecUtils::IsExe(const TEntry& aEntry) |
106 inline TBool SecUtils::IsExe(const TEntry& aEntry) |
89 { |
107 { |
90 return (aEntry[0].iUid == KExecutableImageUidValue) ? ETrue : EFalse; |
108 return (aEntry[0].iUid == KExecutableImageUidValue) ? ETrue : EFalse; |
93 inline TBool SecUtils::IsDll(const TEntry& aEntry) |
111 inline TBool SecUtils::IsDll(const TEntry& aEntry) |
94 { |
112 { |
95 return (aEntry[0].iUid == KDynamicLibraryUidValue) ? ETrue : EFalse; |
113 return (aEntry[0].iUid == KDynamicLibraryUidValue) ? ETrue : EFalse; |
96 } |
114 } |
97 } // namespace Swi |
115 } // namespace Swi |
|
116 |
|
117 #endif |