os/security/crypto/weakcryptospi/source/hash/md5.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200 (2014-06-10)
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 *
    16 */
    17 
    18 
    19 #include <e32std.h>
    20 #include <hash.h>
    21 #include "hashshim.h"
    22 
    23 #define EXPANDLOOP
    24 
    25 //
    26 // 32bit endianness independent MD5 implementation
    27 //
    28 CMD5::CMD5()
    29 	{
    30 	}
    31 	
    32 EXPORT_C CMD5* CMD5::NewL(void)
    33 	{
    34 	CMD5Shim* self=CMD5Shim::NewL();
    35 	self->Reset();
    36 	return self;		
    37 	}
    38 		
    39 EXPORT_C CMD5::~CMD5(void)
    40 	{
    41 	}
    42 
    43 // All these methods have been replaced by the shim
    44 #ifdef _BullseyeCoverage
    45 #pragma suppress_warnings on
    46 #pragma BullseyeCoverage off
    47 #pragma suppress_warnings off
    48 #endif
    49 EXPORT_C CMessageDigest* CMD5::ReplicateL(void)
    50 	{
    51 	// Method replaced by shim
    52 	ASSERT(EFalse);
    53 	return NULL;	
    54 	}
    55 	
    56 EXPORT_C TPtrC8 CMD5::Hash(const TDesC8& /*aMessage*/)
    57 	{
    58 	// Method replaced by shim
    59 	ASSERT(EFalse);
    60 	return KNullDesC8();
    61 	}
    62 
    63 EXPORT_C CMessageDigest* CMD5::CopyL(void)
    64 	{
    65 	// Method replaced by shim
    66 	ASSERT(EFalse);
    67 	return NULL;	
    68 	}
    69 	
    70 EXPORT_C TInt CMD5::BlockSize(void)
    71 	{
    72 	// Method replaced by shim
    73 	ASSERT(EFalse);
    74 	return KErrNotSupported;
    75 	}
    76 	
    77 EXPORT_C TInt CMD5::HashSize(void)
    78 	{
    79 	// Method replaced by shim
    80 	ASSERT(EFalse);
    81 	return KErrNotSupported;
    82 	}
    83 	
    84 EXPORT_C void CMD5::Reset(void)
    85 	{
    86 	// Method replaced by shim
    87 	ASSERT(EFalse);
    88 	}
    89 
    90 EXPORT_C void CMD5::Update(const TDesC8& /*aMessage*/)
    91 	{
    92 	// Method replaced by shim
    93 	ASSERT(EFalse);
    94 	}
    95 	
    96 EXPORT_C TPtrC8 CMD5::Final(const TDesC8& /*aMessage*/)
    97 	{
    98 	// Method replaced by shim
    99 	ASSERT(EFalse);
   100 	return KNullDesC8();
   101 	}
   102 
   103 EXPORT_C TPtrC8 CMD5::Final()
   104 	{
   105 	// Method replaced by shim
   106 	ASSERT(EFalse);
   107 	return KNullDesC8();
   108 	}
   109 
   110 void CMD5::RestoreState()
   111 	{
   112 	// Method replaced by shim
   113 	ASSERT(EFalse);
   114 	}
   115 
   116 void CMD5::StoreState()
   117 	{
   118 	// Method replaced by shim
   119 	ASSERT(EFalse);
   120 	}