diff -r 8ee3d1d01659 -r e6ba5d9eabc1 crypto/weakcryptospi/source/random/messagedigest.cpp --- a/crypto/weakcryptospi/source/random/messagedigest.cpp Mon Mar 08 21:45:09 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* hash.cpp -* (c) 1999-2003 Symbian Ltd. All rights reserved -* -*/ - - -/** - @file -*/ - -#include -#include -#include "sha1shim.h" - -CMessageDigest::CMessageDigest(void):CBase() -{} - -CMessageDigest::CMessageDigest(const CMessageDigest& /*aMD*/):CBase() -{} - -CMessageDigest::~CMessageDigest(void) -{} - -TInt CMessageDigest::GetExtension(TUint aExtensionId, TAny*& a0, TAny* a1) - { - return Extension_(aExtensionId, a0, a1); - } - - -////////////////////////////////////////////////////////////////// -// Factory class to create CMessageDigest derived objects -////////////////////////////////////////////////////////////////// -CMessageDigest* CMessageDigestFactory::NewDigestL(CMessageDigest::THashId aHashId) -{ - CMessageDigest* hash = NULL; - switch (aHashId) - { - case (CMessageDigest::ESHA1): - { - hash = CSHA1Shim::NewL(); - break; - } - default: - User::Leave(KErrNotSupported); - } - - return (hash); -} - -CMessageDigest* CMessageDigestFactory::NewDigestLC(CMessageDigest::THashId aHashId) -{ - CMessageDigest* hash = CMessageDigestFactory::NewDigestL(aHashId); - CleanupStack::PushL(hash); - return (hash); -} -