kerneltest/f32test/plugins/version_2beta/encrypt/encrypt.cpp
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // f32test\plugins\encrypt\encrypt.cpp
       
    15 // 
       
    16 //
       
    17 
       
    18 #include <f32file.h>
       
    19 #include <e32test.h>
       
    20 #include <e32svr.h>
       
    21 #include <f32dbg.h>
       
    22 
       
    23 void Encrypt(TDes8& aBuffer)
       
    24 	{
       
    25 	TInt len = aBuffer.Length();
       
    26 	for (TInt n=0; n<len; n++)
       
    27 		{
       
    28 		aBuffer[n] ^= 0xFF;
       
    29 		}
       
    30 	}
       
    31 
       
    32 void Decrypt(TDes8& aBuffer)
       
    33 	{
       
    34 	TInt len = aBuffer.Length();
       
    35 	for (TInt n=0; n<len; n++)
       
    36 		{
       
    37 		aBuffer[n] ^= 0xFF;
       
    38 		}
       
    39 	}