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 |
|
33 /** |
36 /** |
34 * Static class containing Security Manager's utility functions |
37 * Static class containing Security Manager's utility functions |
35 * @released |
38 * @released |
36 * @internalTechnology |
39 * @internalTechnology |
37 */ |
40 */ |
81 * @param aName Descriptor containing data to hash |
84 * @param aName Descriptor containing data to hash |
82 * @return Pointer to allocated buffer, which will be owned by the |
85 * @return Pointer to allocated buffer, which will be owned by the |
83 * caller. |
86 * caller. |
84 */ |
87 */ |
85 IMPORT_C static HBufC* HexHashL(const TDesC& aName); |
88 IMPORT_C static HBufC* HexHashL(const TDesC& aName); |
|
89 |
|
90 /** |
|
91 * Appends a Uid to the buffer and publishes the same. |
|
92 * @param aBuf The buffer containing the list of Uids that is published. |
|
93 * @param aUid The UID of the package which has been processed. |
|
94 */ |
|
95 IMPORT_C static TInt PublishPackageUid(TUid aUid, TUid (&aUidList)[KMaxUidCount]); |
|
96 |
|
97 /** |
|
98 * Checks if the given Uid is present in the buffer that contains the list of Uids published. |
|
99 * @param aBuf The buffer containing the list of Uids that is published. |
|
100 * @param aUid The UID of the package which to be verified. |
|
101 */ |
|
102 IMPORT_C static TBool IsPackageUidPresent(TUid aUid, const TUid (&aUidList)[KMaxUidCount]); |
86 }; |
103 }; |
87 |
104 |
88 inline TBool SecUtils::IsExe(const TEntry& aEntry) |
105 inline TBool SecUtils::IsExe(const TEntry& aEntry) |
89 { |
106 { |
90 return (aEntry[0].iUid == KExecutableImageUidValue) ? ETrue : EFalse; |
107 return (aEntry[0].iUid == KExecutableImageUidValue) ? ETrue : EFalse; |
93 inline TBool SecUtils::IsDll(const TEntry& aEntry) |
110 inline TBool SecUtils::IsDll(const TEntry& aEntry) |
94 { |
111 { |
95 return (aEntry[0].iUid == KDynamicLibraryUidValue) ? ETrue : EFalse; |
112 return (aEntry[0].iUid == KDynamicLibraryUidValue) ? ETrue : EFalse; |
96 } |
113 } |
97 } // namespace Swi |
114 } // namespace Swi |
|
115 |
|
116 #endif |