TrustCore SDK Crypto Interface API reference  version 2.0
crypto_interface_arc4.h
Go to the documentation of this file.
1 /*
2  * crypto_interface_arc4.h
3  *
4  * Cryptographic Interface header file for declaring RC4 methods
5  * for the Crypto Interface.
6  *
7  * Copyright 2019-2024 DigiCert, Inc. All Rights Reserved.
8  * Proprietary and Confidential Material.
9  *
10  */
11 
19 #ifndef __CRYPTO_INTERFACE_ARC4_HEADER__
20 #define __CRYPTO_INTERFACE_ARC4_HEADER__
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
39 MOC_EXTERN BulkCtx CRYPTO_INTERFACE_CreateRC4Ctx(
40  MOC_SYM(hwAccelDescr hwAccelCtx) ubyte *pKeyMaterial,
41  sbyte4 keyLen,
42  sbyte4 encrypt
43  );
44 
53 MOC_EXTERN MSTATUS CRYPTO_INTERFACE_DeleteRC4Ctx(
54  MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx *ppCtx
55  );
56 
57 
71 MOC_EXTERN MSTATUS CRYPTO_INTERFACE_DoRC4(
72  MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx pCtx,
73  ubyte *pData,
74  sbyte4 dataLen,
75  sbyte4 encrypt,
76  ubyte *pIv
77  );
78 
89 MOC_EXTERN MSTATUS CRYPTO_INTERFACE_CloneRC4Ctx(
90  MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx pCtx,
91  BulkCtx *ppNewCtx
92  );
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif /* __CRYPTO_INTERFACE_ARC4_HEADER__ */
MOC_EXTERN BulkCtx CRYPTO_INTERFACE_CreateRC4Ctx(MOC_SYM(hwAccelDescr hwAccelCtx) ubyte *pKeyMaterial, sbyte4 keyLen, sbyte4 encrypt)
Create a new RC4 context.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_CloneRC4Ctx(MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx pCtx, BulkCtx *ppNewCtx)
Clone RC4 context previously created with CRYPTO_INTERFACE_CreateRC4Ctx.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_DeleteRC4Ctx(MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx *ppCtx)
Deletes and frees memory allocated within an RC4 context.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_DoRC4(MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx pCtx, ubyte *pData, sbyte4 dataLen, sbyte4 encrypt, ubyte *pIv)
Performs the RC4 cipher operation in-place.