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