os/security/crypto/weakcrypto/inc/nullcipher.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/crypto/weakcrypto/inc/nullcipher.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,67 @@
     1.4 +/*
     1.5 +* Copyright (c) 2002-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 +* ** IMPORTANT ** PublishedPartner API's in this file are published to 3rd party developers via the 
    1.19 +* Symbian website. Changes to these API's should be treated as PublishedAll API changes and the Security TA should be consulted.
    1.20 +* CNullCipher class implementation
    1.21 +*
    1.22 +*/
    1.23 +
    1.24 +
    1.25 +/**
    1.26 + @file 
    1.27 + @publishedPartner
    1.28 + @released 
    1.29 +*/
    1.30 + 
    1.31 +#ifndef __NULLCIPHER_H__
    1.32 +#define __NULLCIPHER_H__
    1.33 +
    1.34 +#include "streamcipher.h"
    1.35 +
    1.36 +/**
    1.37 +* Stream cipher that does no encryption or decryption, but simply returns the
    1.38 +* data given to it.
    1.39 +* From CBlockTransformation
    1.40 +*
    1.41 +*/
    1.42 +class CNullCipher : public CStreamCipher
    1.43 +{
    1.44 +public:	
    1.45 +	/**
    1.46 +	 * Creates a new CNullCipher object.
    1.47 +	 * 
    1.48 +	 * @return	A pointer to a new CNullCipher object
    1.49 +	 */
    1.50 +	IMPORT_C static CNullCipher* NewL(void);
    1.51 +
    1.52 +	/**
    1.53 +	 * Creates a new CNullCipher object.
    1.54 +	 * 
    1.55 +	 * The returned pointer is put onto the cleanup stack.
    1.56 +	 * 
    1.57 +	 * @return	A pointer to a new CNullCipher object
    1.58 +	 */
    1.59 +	IMPORT_C static CNullCipher* NewLC(void);
    1.60 +	virtual void Reset(void);
    1.61 +	virtual TInt KeySize(void) const;
    1.62 +protected:
    1.63 +	virtual void DoProcess(TDes8& aData);
    1.64 +	/**
    1.65 +	 * @internalAll
    1.66 +	 */
    1.67 +	CNullCipher();
    1.68 +};
    1.69 +
    1.70 +#endif	//	__NULLCIPHER_H__