cryptomgmtlibs/securityutils/privateinc/e32secdes8.h
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 /*
       
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 /**
       
    24  @file
       
    25  @internalTechnology
       
    26 */
       
    27 
       
    28 #ifndef __TSECBUF8_H__
       
    29 #define __TSECBUF8_H__
       
    30 
       
    31 #include <e32des8.h>
       
    32 
       
    33 template <TInt S> 
       
    34 class TSecBuf8 : public TBuf8<S>
       
    35 	{
       
    36 public:
       
    37 	inline TSecBuf8(void);
       
    38 	inline TSecBuf8(TInt aLength);
       
    39 	inline TSecBuf8(const TUint8* aString);
       
    40 	inline TSecBuf8(const TDesC8& aDes);
       
    41 	inline ~TSecBuf8(void);
       
    42 	inline TSecBuf8<S>& operator=(const TUint8* aString);
       
    43 	inline TSecBuf8<S>& operator=(const TDesC8& aDes);
       
    44 	inline TSecBuf8<S>& operator=(const TSecBuf8<S>& aBuf);
       
    45 	};
       
    46 
       
    47 template <TInt S> 
       
    48 inline TSecBuf8<S>::TSecBuf8(void) 
       
    49 	: TBuf8<S>() 
       
    50 	{}
       
    51 template <TInt S> 
       
    52 inline TSecBuf8<S>::TSecBuf8(TInt aLength) 
       
    53 	: TBuf8<S>(aLength) 
       
    54 	{}
       
    55 template <TInt S> 
       
    56 inline TSecBuf8<S>::TSecBuf8(const TUint8* aString)
       
    57 	: TBuf8<S>(aString) 
       
    58 	{}
       
    59 template <TInt S> 
       
    60 inline TSecBuf8<S>::TSecBuf8(const TDesC8& aDes)
       
    61 	: TBuf8<S>(aDes) 
       
    62 	{}
       
    63 template <TInt S> 
       
    64 inline TSecBuf8<S>::~TSecBuf8(void)
       
    65 	{
       
    66 	FillZ(MaxLength());
       
    67 	SetLength(0);
       
    68 	}
       
    69 template <TInt S>
       
    70 inline TSecBuf8<S>& TSecBuf8<S>::operator=(const TUint8* aString)
       
    71 	{
       
    72 	Copy(aString); return(*this);
       
    73 	}
       
    74 template <TInt S>
       
    75 inline TSecBuf8<S>& TSecBuf8<S>::operator=(const TDesC8& aDes)
       
    76 	{
       
    77 	Copy(aDes); return(*this);
       
    78 	}
       
    79 template <TInt S>
       
    80 inline TSecBuf8<S>& TSecBuf8<S>::operator=(const TSecBuf8<S>& aBuf)
       
    81 	{
       
    82 	Copy(aBuf); return(*this);
       
    83 	}
       
    84 
       
    85 #endif