os/security/crypto/weakcryptospi/source/symmetric/rc2.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/rc2.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,100 @@
     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 <rc2.h>
    1.23 +#include "rc2shim.h"
    1.24 +
    1.25 +CRC2::CRC2()
    1.26 +	{
    1.27 +	}
    1.28 +
    1.29 +/* CRC2Encryptor */
    1.30 +EXPORT_C CRC2Encryptor* CRC2Encryptor::NewL(const TDesC8& aKey, TInt aEffectiveKeyLenBits)
    1.31 +	{
    1.32 +	return CRC2EncryptorShim::NewL(aKey, aEffectiveKeyLenBits);
    1.33 +	}
    1.34 +
    1.35 +EXPORT_C CRC2Encryptor* CRC2Encryptor::NewLC(const TDesC8& aKey, TInt aEffectiveKeyLenBits)
    1.36 +	{
    1.37 +	return CRC2EncryptorShim::NewLC(aKey, aEffectiveKeyLenBits);
    1.38 +	}
    1.39 +	
    1.40 +CRC2Encryptor::CRC2Encryptor()
    1.41 +	{
    1.42 +	}
    1.43 +
    1.44 +/* CRC2Decryptor */
    1.45 +EXPORT_C CRC2Decryptor* CRC2Decryptor::NewL(const TDesC8& aKey, TInt aEffectiveKeyLenBits)
    1.46 +	{
    1.47 +	return CRC2DecryptorShim::NewL(aKey, aEffectiveKeyLenBits);
    1.48 +	}
    1.49 +
    1.50 +EXPORT_C CRC2Decryptor* CRC2Decryptor::NewLC(const TDesC8& aKey, TInt aEffectiveKeyLenBits)
    1.51 +	{
    1.52 +	return CRC2DecryptorShim::NewLC(aKey, aEffectiveKeyLenBits);
    1.53 +	}
    1.54 +
    1.55 +CRC2Decryptor::CRC2Decryptor()
    1.56 +	{	
    1.57 +	}
    1.58 +	
    1.59 +// All these methods have been replaced by the shim
    1.60 +#ifdef _BullseyeCoverage
    1.61 +#pragma suppress_warnings on
    1.62 +#pragma BullseyeCoverage off
    1.63 +#pragma suppress_warnings off
    1.64 +#endif
    1.65 +
    1.66 +TInt CRC2::BlockSize() const
    1.67 +	{
    1.68 +	// Method replaced by shim 
    1.69 +	ASSERT(EFalse);			
    1.70 +	return 0;
    1.71 +	}
    1.72 +
    1.73 +TInt CRC2::KeySize() const
    1.74 +	{
    1.75 +	// Method replaced by shim 
    1.76 +	ASSERT(EFalse);			
    1.77 +	return 0;
    1.78 +	}
    1.79 +	
    1.80 +void CRC2::Reset()
    1.81 +	{
    1.82 +	// Method replaced by shim 
    1.83 +	ASSERT(EFalse);			
    1.84 +	}	
    1.85 +	
    1.86 +void CRC2::SetKey(const TDesC8& /*aKey*/, TInt /*aEffectiveKeyLenBits*/)
    1.87 +	{
    1.88 +	// Method replaced by shim 
    1.89 +	ASSERT(EFalse);				
    1.90 +	}	
    1.91 +
    1.92 +void CRC2Decryptor::Transform(TDes8& /*aBlock*/)
    1.93 +	{
    1.94 +	// Method replaced by shim 
    1.95 +	ASSERT(EFalse);	
    1.96 +	}		
    1.97 +
    1.98 +void CRC2Encryptor::Transform(TDes8& /*aBlock*/)
    1.99 +	{
   1.100 +	// Method replaced by shim 
   1.101 +	ASSERT(EFalse);	
   1.102 +	}	
   1.103 +