os/security/crypto/weakcryptospi/source/symmetric/3des.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/crypto/weakcryptospi/source/symmetric/3des.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,106 @@
     1.4 +/*
     1.5 +* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#include "3des.h"
    1.23 +#include "3desshim.h"
    1.24 +
    1.25 +const TInt K3DESBlockBytes = 8;
    1.26 +const TInt K3DESKeyBytes = 24;
    1.27 +
    1.28 +C3DES::C3DES()
    1.29 +	{
    1.30 +	}
    1.31 +
    1.32 +/* C3DESEncryptor */
    1.33 +EXPORT_C C3DESEncryptor* C3DESEncryptor::NewL(const TDesC8& aKey)
    1.34 +	{
    1.35 +	return C3DESEncryptorShim::NewL(aKey);
    1.36 +	}
    1.37 +
    1.38 +EXPORT_C C3DESEncryptor* C3DESEncryptor::NewLC(const TDesC8& aKey)
    1.39 +	{
    1.40 +	return C3DESEncryptorShim::NewLC(aKey);
    1.41 +	}
    1.42 +
    1.43 +/* C3DESDecryptor */
    1.44 +EXPORT_C C3DESDecryptor* C3DESDecryptor::NewL(const TDesC8& aKey)
    1.45 +	{
    1.46 +	return C3DESDecryptorShim::NewL(aKey);
    1.47 +	}
    1.48 +
    1.49 +EXPORT_C C3DESDecryptor* C3DESDecryptor::NewLC(const TDesC8& aKey)
    1.50 +	{
    1.51 +	return C3DESDecryptorShim::NewLC(aKey);
    1.52 +	}
    1.53 +	
    1.54 +// All these methods have been replaced by the shim
    1.55 +#ifdef _BullseyeCoverage
    1.56 +#pragma suppress_warnings on
    1.57 +#pragma BullseyeCoverage off
    1.58 +#pragma suppress_warnings off
    1.59 +#endif
    1.60 +
    1.61 +void C3DES::Transform(TDes8& /*aBlock*/)
    1.62 +	{
    1.63 +	// Method replaced by shim 
    1.64 +	ASSERT(EFalse);		
    1.65 +	}
    1.66 +	
    1.67 +void C3DES::Reset()
    1.68 +	{
    1.69 +	// Method replaced by shim 
    1.70 +	ASSERT(EFalse);			
    1.71 +	}
    1.72 +	
    1.73 +TInt C3DES::BlockSize() const
    1.74 +	{
    1.75 +	// Method replaced by shim 
    1.76 +	ASSERT(EFalse);
    1.77 +	return K3DESBlockBytes;			
    1.78 +	}	
    1.79 +
    1.80 +TInt C3DES::KeySize() const
    1.81 +	{
    1.82 +	// Method replaced by shim 
    1.83 +	ASSERT(EFalse);
    1.84 +	return K3DESKeyBytes;		
    1.85 +	}
    1.86 +	
    1.87 +void C3DES::DoSetKey(const TDesC8& /*aKey*/)
    1.88 +	{
    1.89 +	// Method replaced by shim 
    1.90 +	ASSERT(EFalse);				
    1.91 +	}
    1.92 +	
    1.93 +void C3DES::ConstructL(const TDesC8& /*aKey*/)
    1.94 +	{
    1.95 +	// Method replaced by shim 
    1.96 +	ASSERT(EFalse);			
    1.97 +	}	
    1.98 +
    1.99 +void C3DESEncryptor::DoSetKey(const TDesC8& /*aKey*/)
   1.100 +	{
   1.101 +	// Method replaced by shim 
   1.102 +	ASSERT(EFalse);				
   1.103 +	}	
   1.104 +
   1.105 +void C3DESDecryptor::DoSetKey(const TDesC8& /*aKey*/)
   1.106 +	{
   1.107 +	// Method replaced by shim 
   1.108 +	ASSERT(EFalse);				
   1.109 +	}