os/security/cryptoservices/filebasedcertificateandkeystores/source/keystore/Server/keystreamutils.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2004-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 * Serialization for public and private keys
    16 *
    17 */
    18 
    19 
    20 /**
    21  @file 
    22  @internalTechnology
    23 */
    24 
    25 #ifndef __KEYSTREAMUTILS_H__
    26 #define __KEYSTREAMUTILS_H__
    27 
    28 #include <s32strm.h>
    29 #ifdef SYMBIAN_KEYSTORE_USE_AUTH_SERVER
    30 #include <s32std.h>
    31 #endif // SYMBIAN_KEYSTORE_USE_AUTH_SERVER
    32 #include "fsmarshaller.h"
    33 
    34 class CRSAPublicKey;
    35 class CRSAPrivateKey;
    36 class CDSAPublicKey;
    37 class CDSAPrivateKey;
    38 class RInteger;
    39 
    40 EXTERNALIZE_FUNCTION(CRSAPublicKey)
    41 EXTERNALIZE_FUNCTION(CRSAPrivateKey)
    42 EXTERNALIZE_FUNCTION(CDSAPublicKey)
    43 EXTERNALIZE_FUNCTION(CDSAPrivateKey)
    44 
    45 void ExternalizeL(const CRSAPublicKey& aData, RWriteStream& aStream);
    46 void ExternalizeL(const CRSAPrivateKey& aData, RWriteStream& aStream);
    47 void ExternalizeL(const CDSAPublicKey& aData, RWriteStream& aStream);
    48 void ExternalizeL(const CDSAPrivateKey& aData, RWriteStream& aStream);
    49 
    50 void CreateL(RReadStream& aStream, CRSAPublicKey*& aOut);
    51 void CreateL(RReadStream& aStream, CRSAPrivateKey*& aOut);
    52 void CreateL(RReadStream& aStream, CDSAPublicKey*& aOut);
    53 void CreateL(RReadStream& aStream, CDSAPrivateKey*& aOut);
    54 
    55 #ifdef SYMBIAN_KEYSTORE_USE_AUTH_SERVER
    56 HBufC8* DecryptFromStreamL( RReadStream& aInStream, TPtrC8& aKey );
    57 #endif // SYMBIAN_KEYSTORE_USE_AUTH_SERVER
    58 #endif