--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/weakcrypto/inc/blocktransformation.h Wed Jul 08 11:25:26 2009 +0100
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2002-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:
+* ** IMPORTANT ** PublishedPartner API's in this file are published to 3rd party developers via the
+* Symbian website. Changes to these API's should be treated as PublishedAll API changes and the Security TA should be consulted.
+* CBlockTransformation class implementation
+*
+*/
+
+
+
+
+/**
+ @file
+ @internalAll
+*/
+
+#ifndef __BLOCKTRANSFORMATION_H__
+#define __BLOCKTRANSFORMATION_H__
+
+#include <e32base.h>
+
+/** The maximum block size supported (in bytes) */
+const TUint KMaxBlockSizeSupported = 32;
+
+/**
+* Abstract base class defining the interface to block transformation schemes.
+*
+* Block transformation schemes process a fixed-size block of input to return a
+* block of output the same size.
+*
+* @publishedPartner
+* @released
+*/
+class CBlockTransformation : public CBase
+{
+public:
+ /**
+ * Transforms the supplied block, returning the new value using the same
+ * parameter. aBlock.Size() must be the same length as BlockSize().
+ *
+ * @param aBlock On input, the data to be transformed;
+ * on return, the data after transformation.
+ */
+ virtual void Transform(TDes8& aBlock) = 0;
+
+ /**
+ * Resets the transformation back to its original state. Clears all its buffers.
+ */
+ virtual void Reset() = 0;
+
+ /**
+ * Gets the block size in bytes.
+ *
+ * @return Block size in bytes.
+ */
+ virtual TInt BlockSize() const = 0;
+
+ /**
+ * Gets the key size in bits.
+ *
+ * @return Key size in bits.
+ */
+ virtual TInt KeySize() const = 0;
+};
+
+#endif // __BLOCKTRANSFORMATION_H__