1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/crypto/weakcryptospi/source/hash/md2.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,118 @@
1.4 +/*
1.5 +* Copyright (c) 2003-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 <e32std.h>
1.23 +#include <hash.h>
1.24 +#include "hashshim.h"
1.25 +
1.26 +#define EXPANDLOOP
1.27 +
1.28 +//
1.29 +// 32bit endianness independent MD2 implementation
1.30 +//
1.31 +CMD2::CMD2()
1.32 + {
1.33 + }
1.34 +
1.35 +EXPORT_C CMD2* CMD2::NewL(void)
1.36 + {
1.37 + return CMD2Shim::NewL();
1.38 + }
1.39 +
1.40 +EXPORT_C CMD2::~CMD2(void)
1.41 + {
1.42 + }
1.43 +
1.44 +// All these methods have been replaced by the shim
1.45 +#ifdef _BullseyeCoverage
1.46 +#pragma suppress_warnings on
1.47 +#pragma BullseyeCoverage off
1.48 +#pragma suppress_warnings off
1.49 +#endif
1.50 +EXPORT_C CMessageDigest* CMD2::ReplicateL(void)
1.51 + {
1.52 + // Method replaced by shim
1.53 + ASSERT(EFalse);
1.54 + return NULL;
1.55 + }
1.56 +
1.57 +EXPORT_C TPtrC8 CMD2::Hash(const TDesC8& /*aMessage*/)
1.58 + {
1.59 + // Method replaced by shim
1.60 + ASSERT(EFalse);
1.61 + return KNullDesC8();
1.62 + }
1.63 +
1.64 +EXPORT_C CMessageDigest* CMD2::CopyL(void)
1.65 + {
1.66 + // Method replaced by shim
1.67 + ASSERT(EFalse);
1.68 + return NULL;
1.69 + }
1.70 +
1.71 +EXPORT_C TInt CMD2::BlockSize(void)
1.72 + {
1.73 + // Method replaced by shim
1.74 + ASSERT(EFalse);
1.75 + return KErrNotSupported;
1.76 + }
1.77 +
1.78 +EXPORT_C TInt CMD2::HashSize(void)
1.79 + {
1.80 + // Method replaced by shim
1.81 + ASSERT(EFalse);
1.82 + return KErrNotSupported;
1.83 + }
1.84 +
1.85 +EXPORT_C void CMD2::Reset(void)
1.86 + {
1.87 + // Method replaced by shim
1.88 + ASSERT(EFalse);
1.89 + }
1.90 +
1.91 +EXPORT_C void CMD2::Update(const TDesC8& /*aMessage*/)
1.92 + {
1.93 + // Method replaced by shim
1.94 + ASSERT(EFalse);
1.95 + }
1.96 +
1.97 +EXPORT_C TPtrC8 CMD2::Final(const TDesC8& /*aMessage*/)
1.98 + {
1.99 + // Method replaced by shim
1.100 + ASSERT(EFalse);
1.101 + return KNullDesC8();
1.102 + }
1.103 +
1.104 +EXPORT_C TPtrC8 CMD2::Final()
1.105 + {
1.106 + // Method replaced by shim
1.107 + ASSERT(EFalse);
1.108 + return KNullDesC8();
1.109 + }
1.110 +
1.111 +void CMD2::RestoreState()
1.112 + {
1.113 + // Method replaced by shim
1.114 + ASSERT(EFalse);
1.115 + }
1.116 +
1.117 +void CMD2::StoreState()
1.118 + {
1.119 + // Method replaced by shim
1.120 + ASSERT(EFalse);
1.121 + }