sl@0: /* sl@0: * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: Contains the WSD solution sl@0: * sl@0: */ sl@0: sl@0: sl@0: // INCLUDE FILES sl@0: #define EMULATOR ((defined(__WINS__) || defined(__WINSCW__))) sl@0: sl@0: #if EMULATOR sl@0: sl@0: #include sl@0: sl@0: #include "wsd_solution.h" sl@0: #include "pls.h" // For emulator WSD API sl@0: sl@0: const TUid KLibdlUid3 = {0x10281F2D}; sl@0: sl@0: LOCAL_C TInt InitializeWsd(TLibcryptWsd *aData) sl@0: { sl@0: unsigned int bits32Initializer[32] = sl@0: { sl@0: 0x80000000, 0x40000000, 0x20000000, 0x10000000, sl@0: 0x08000000, 0x04000000, 0x02000000, 0x01000000, sl@0: 0x00800000, 0x00400000, 0x00200000, 0x00100000, sl@0: 0x00080000, 0x00040000, 0x00020000, 0x00010000, sl@0: 0x00008000, 0x00004000, 0x00002000, 0x00001000, sl@0: 0x00000800, 0x00000400, 0x00000200, 0x00000100, sl@0: 0x00000080, 0x00000040, 0x00000020, 0x00000010, sl@0: 0x00000008, 0x00000004, 0x00000002, 0x00000001 sl@0: }; sl@0: aData->des_initialised = 0; sl@0: sl@0: aData->m_sbox = NULL; sl@0: aData->psbox = NULL; sl@0: sl@0: aData->ip_maskl = NULL; sl@0: aData->ip_maskr = NULL; sl@0: sl@0: aData->fp_maskl = NULL; sl@0: aData->fp_maskr = NULL; sl@0: sl@0: aData->key_perm_maskl = NULL; sl@0: aData->key_perm_maskr = NULL; sl@0: sl@0: aData->comp_maskl = NULL; sl@0: aData->comp_maskr = NULL; sl@0: sl@0: aData->old_rawkey0 = 0; sl@0: aData->old_rawkey1 = 0; sl@0: sl@0: for(int i=0 ; i<32 ; ++i) sl@0: { sl@0: (aData->bits32)[i] = bits32Initializer[i]; sl@0: } sl@0: sl@0: // Initialize desKey array sl@0: for(int j=0 ; j<64 ; ++j) sl@0: { sl@0: (aData->desKey)[j] = 0; sl@0: } sl@0: aData->bSetkeyInvoked = 0; sl@0: sl@0: return KErrNone; sl@0: } sl@0: sl@0: extern "C" TLibcryptWsd* GetGlobals() sl@0: { sl@0: // Access the PLS of this process sl@0: TLibcryptWsd *p = Pls(KLibdlUid3,InitializeWsd); sl@0: return p; sl@0: } sl@0: sl@0: #endif