os/security/cryptoplugins/cryptospiplugins/test/dummyecchwplugin/src/cryptospihai.h
Update contrib.
2 * Copyright (c) 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.
24 #ifndef CCRYPTOSPIHAI_H
25 #define CCRYPTOSPIHAI_H
29 #include <cryptospi/cryptospidef.h>
30 #include <cryptospi/cryptoparams.h>
32 namespace CryptoSpiHai
35 * This class forms the hardware abstraction interface part of the
36 * cryptoSPI. In the production code, this should be replaced by a
37 * device driver. This layer abstracts the hardware from a cryptoSPI
38 * plugin. It interacts with the HAI of crypto token to get the actual
39 * key and performs the operations. This layer should be implemented in
42 NONSHARABLE_CLASS(CCryptoSpiHai) : public CBase
46 * Performs the signing operation.
48 * A cryptoSPI plugin uses this, when it does not have access
51 * @param aKeyHandle The key handle retrieved from hw crypto
53 * @param aInput The text which has to be signed.
54 * @param aSignature Output param. The cryptoSPI signature.
56 * @leave Can leave with all the leave codes present in HAI of
57 * reference crypto token implementation.
59 IMPORT_C static void SignL(TInt aKeyHandle,
60 const TDesC8& aInput, CryptoSpi::CCryptoParams& aSignature);
63 * Performs the decryption operation.
65 * A cryptoSPI plugin uses this, when it does not have access
68 * @param aKeyHandle The key handle retrieved from hw crypto
70 * @param aInput The cipher text.
71 * @param aOutput Output param. The decrypted plain text
73 * @leave Can leave with all the leave codes present in HAI of
74 * reference crypto token implementation.
76 IMPORT_C static void DecryptL(TInt aKeyHandle,
77 const TDesC8& aInput, TDes8& aOuput);
81 #endif // CCRYPTOSPIHAI_H