sl@0: /* sl@0: * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * ** IMPORTANT ** PublishedPartner API's in this file are published to 3rd party developers via the sl@0: * Symbian website. Changes to these API's should be treated as PublishedAll API changes and the Security TA should be consulted. sl@0: * CBlockTransformation class implementation sl@0: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: sl@0: #ifndef BLOCKTRANSFORMATION_H__ sl@0: #define BLOCKTRANSFORMATION_H__ sl@0: sl@0: #include sl@0: sl@0: #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS sl@0: /** The maximum block size supported (in bytes) */ sl@0: const TUint KMaxBlockSizeSupported = 32; sl@0: #endif sl@0: sl@0: /** sl@0: * Abstract base class defining the interface to block transformation schemes. sl@0: * sl@0: * Block transformation schemes process a fixed-size block of input to return a sl@0: * block of output the same size. sl@0: * sl@0: */ sl@0: class CBlockTransformation : public CBase sl@0: { sl@0: public: sl@0: /** sl@0: * Transforms the supplied block, returning the new value using the same sl@0: * parameter. aBlock.Size() must be the same length as BlockSize(). sl@0: * sl@0: * @param aBlock On input, the data to be transformed; sl@0: * on return, the data after transformation. sl@0: */ sl@0: virtual void Transform(TDes8& aBlock) = 0; sl@0: sl@0: /** sl@0: * Resets the transformation back to its original state. Clears all its buffers. sl@0: */ sl@0: virtual void Reset() = 0; sl@0: sl@0: /** sl@0: * Gets the block size in bytes. sl@0: * sl@0: * @return Block size in bytes. sl@0: */ sl@0: virtual TInt BlockSize() const = 0; sl@0: sl@0: /** sl@0: * Gets the key size in bits. sl@0: * sl@0: * @return Key size in bits. sl@0: */ sl@0: virtual TInt KeySize() const = 0; sl@0: }; sl@0: sl@0: #endif // BLOCKTRANSFORMATION_H__