Update contrib.
     2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
 
     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".
 
     9 * Initial Contributors:
 
    10 * Nokia Corporation - initial contribution.
 
    15 * ARC4 shim classes definition
 
    34 	class CSymmetricCipher;
 
    38 NONSHARABLE_CLASS(CArc4Shim) : public CARC4
 
    42 	Creates a CArc4Shim object which has the same interface as CARC4 
 
    43 	but delegates all work to a Crypto SPI plug-in.
 
    44 	@param aKey					The key to use. aKey must be less 
 
    45 								than or equal to KRC4MaxKeySizeBytes.  
 
    46 	@param aDiscardBytes		The number of bytes to drop from the 
 
    47 								beginning of the key stream.
 
    48 	@return						A pointer to a CArc4Shim instance
 
    49 	@leave KErrKeyNotWeakEnough	If the key size is larger than that 
 
    50 								allowed by the cipher strength 
 
    51 								restrictions of the crypto library.
 
    52 								See TCrypto::IsSymmetricWeakEnoughL()
 
    54 	static CArc4Shim* NewL(const TDesC8& aKey, TUint aDiscardBytes);
 
    57 	Creates a CArc4Shim object which has the same interface as CARC4,
 
    58 	and leave it on the cleanup stack. but delegates all work to a 
 
    60 	@param aKey					The key to use. aKey must be less 
 
    61 								than or equal to KRC4MaxKeySizeBytes.  
 
    62 	@param aDiscardBytes		The number of bytes to drop from the 
 
    63 								beginning of the key stream.
 
    64 	@return						A pointer to a CArc4Shim instance
 
    65 	@leave KErrKeyNotWeakEnough	If the key size is larger than that 
 
    66 								allowed by the cipher strength 
 
    67 								restrictions of the crypto library.
 
    68 								See TCrypto::IsSymmetricWeakEnoughL()
 
    70 	static CArc4Shim* NewLC(const TDesC8& aKey, TUint aDiscardBytes);
 
    77 	// From CSymmetricCipher class
 
    79 	TInt BlockSize() const;
 
    81 	void Process(const TDesC8& aInput, TDes8& aOutput);
 
    82 	void ProcessFinalL(const TDesC8& aInput, TDes8& aOutput);
 
    83 	TInt MaxOutputLength(TInt aInputLength) const;
 
    84 	TInt MaxFinalOutputLength(TInt aInputLength) const;
 
    93 	Second Phase Constructor
 
    95 	void ConstructL(const TDesC8& aKey, TUint aDiscardBytes);
 
    99 	CryptoSpi::CSymmetricCipher* iSymmetricCipherImpl;
 
   101 	/// SPI requires all key to passed as key-objects
 
   102 	CryptoSpi::CKey* iKey;
 
   104 	CryptoSpi::CCryptoParams* iAlgorithmParams;