os/security/crypto/weakcryptospi/source/hash/sha2.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2007-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 //
    24 // SHA-2 implementation
    25 //
    26 CSHA2::CSHA2()
    27 	{		
    28 	}
    29 	
    30 EXPORT_C CSHA2* CSHA2::NewL(TSH2Algo aAlgorithmId)
    31 	{
    32 	CSHA2* self = CSHA2::NewLC(aAlgorithmId);
    33 	CleanupStack::Pop(self);
    34 	return self;
    35 	}
    36 
    37 EXPORT_C CSHA2* CSHA2::NewLC(TSH2Algo aAlgorithmId)
    38 	{
    39 	CSHA2* self =CSHA2Shim::NewLC(aAlgorithmId);
    40 	self->Reset();
    41 	return self;						
    42 	}	
    43 	
    44 EXPORT_C CSHA2::~CSHA2(void)
    45 	{
    46 	}
    47 	
    48 // All these methods have been replaced by the shim
    49 #ifdef _BullseyeCoverage
    50 #pragma suppress_warnings on
    51 #pragma BullseyeCoverage off
    52 #pragma suppress_warnings off
    53 #endif
    54 
    55 void CSHA2::RestoreState()
    56 	{
    57 	ASSERT(EFalse);
    58 	}
    59 
    60 void CSHA2::StoreState()
    61 	{
    62 	ASSERT(EFalse);
    63 	}