sl@0: /* sl@0: * Copyright (c) 2002-2009 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 the License "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: sl@0: * sl@0: */ sl@0: sl@0: sl@0: #include "3des.h" sl@0: #include "3desshim.h" sl@0: sl@0: const TInt K3DESBlockBytes = 8; sl@0: const TInt K3DESKeyBytes = 24; sl@0: sl@0: C3DES::C3DES() sl@0: { sl@0: } sl@0: sl@0: /* C3DESEncryptor */ sl@0: EXPORT_C C3DESEncryptor* C3DESEncryptor::NewL(const TDesC8& aKey) sl@0: { sl@0: return C3DESEncryptorShim::NewL(aKey); sl@0: } sl@0: sl@0: EXPORT_C C3DESEncryptor* C3DESEncryptor::NewLC(const TDesC8& aKey) sl@0: { sl@0: return C3DESEncryptorShim::NewLC(aKey); sl@0: } sl@0: sl@0: /* C3DESDecryptor */ sl@0: EXPORT_C C3DESDecryptor* C3DESDecryptor::NewL(const TDesC8& aKey) sl@0: { sl@0: return C3DESDecryptorShim::NewL(aKey); sl@0: } sl@0: sl@0: EXPORT_C C3DESDecryptor* C3DESDecryptor::NewLC(const TDesC8& aKey) sl@0: { sl@0: return C3DESDecryptorShim::NewLC(aKey); sl@0: } sl@0: sl@0: // All these methods have been replaced by the shim sl@0: #ifdef _BullseyeCoverage sl@0: #pragma suppress_warnings on sl@0: #pragma BullseyeCoverage off sl@0: #pragma suppress_warnings off sl@0: #endif sl@0: sl@0: void C3DES::Transform(TDes8& /*aBlock*/) sl@0: { sl@0: // Method replaced by shim sl@0: ASSERT(EFalse); sl@0: } sl@0: sl@0: void C3DES::Reset() sl@0: { sl@0: // Method replaced by shim sl@0: ASSERT(EFalse); sl@0: } sl@0: sl@0: TInt C3DES::BlockSize() const sl@0: { sl@0: // Method replaced by shim sl@0: ASSERT(EFalse); sl@0: return K3DESBlockBytes; sl@0: } sl@0: sl@0: TInt C3DES::KeySize() const sl@0: { sl@0: // Method replaced by shim sl@0: ASSERT(EFalse); sl@0: return K3DESKeyBytes; sl@0: } sl@0: sl@0: void C3DES::DoSetKey(const TDesC8& /*aKey*/) sl@0: { sl@0: // Method replaced by shim sl@0: ASSERT(EFalse); sl@0: } sl@0: sl@0: void C3DES::ConstructL(const TDesC8& /*aKey*/) sl@0: { sl@0: // Method replaced by shim sl@0: ASSERT(EFalse); sl@0: } sl@0: sl@0: void C3DESEncryptor::DoSetKey(const TDesC8& /*aKey*/) sl@0: { sl@0: // Method replaced by shim sl@0: ASSERT(EFalse); sl@0: } sl@0: sl@0: void C3DESDecryptor::DoSetKey(const TDesC8& /*aKey*/) sl@0: { sl@0: // Method replaced by shim sl@0: ASSERT(EFalse); sl@0: }