Update contrib.
2 * Copyright (c) 2002-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.
20 #include "streamcipher.h"
21 #include <cryptopanic.h>
23 EXPORT_C void CStreamCipher::ProcessFinalL(const TDesC8& aInput, TDes8& aOutput)
25 Process(aInput, aOutput);
28 EXPORT_C void CStreamCipher::Process(const TDesC8& aInput, TDes8& aOutput)
30 TInt outputIndex = aOutput.Size();
32 // aOutput may already have outputIndex bytes of data in it
33 // check there will still be enough space to process the result
34 __ASSERT_DEBUG(aOutput.MaxLength() - outputIndex >= MaxOutputLength(aInput.Length()), User::Panic(KCryptoPanic, ECryptoPanicOutputDescriptorOverflow));
36 aOutput.Append(aInput);
38 TPtr8 transformBuf((TUint8*)(aOutput.Ptr()) + outputIndex, aInput.Size(),
40 DoProcess(transformBuf);
43 EXPORT_C TInt CStreamCipher::BlockSize() const
48 EXPORT_C TInt CStreamCipher::MaxOutputLength(TInt aInputLength) const
53 EXPORT_C TInt CStreamCipher::MaxFinalOutputLength(TInt aInputLength) const