Cryptographic Interface header file for declaring RC4 methods.
More...
Go to the source code of this file.
|
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_CloneRC4Ctx (MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx pCtx, BulkCtx *ppNewCtx) |
| Clone RC4 context previously created with CRYPTO_INTERFACE_CreateRC4Ctx. More...
|
|
MOC_EXTERN BulkCtx | CRYPTO_INTERFACE_CreateRC4Ctx (MOC_SYM(hwAccelDescr hwAccelCtx) ubyte *pKeyMaterial, sbyte4 keyLen, sbyte4 encrypt) |
| Create a new RC4 context. More...
|
|
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_DeleteRC4Ctx (MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx *ppCtx) |
| Deletes and frees memory allocated within an RC4 context. More...
|
|
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. More...
|
|
◆ CRYPTO_INTERFACE_CloneRC4Ctx()
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_CloneRC4Ctx |
( |
MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx |
pCtx, |
|
|
BulkCtx * |
ppNewCtx |
|
) |
| |
- Parameters
-
pCtx | Pointer to a BulkCtx returned by CRYPTO_INTERFACE_CreateRC4Ctx. |
ppNewCtx | Double pointer to the BulkCtx to be created and populated with the key data from the source key. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ CRYPTO_INTERFACE_CreateRC4Ctx()
MOC_EXTERN BulkCtx CRYPTO_INTERFACE_CreateRC4Ctx |
( |
MOC_SYM(hwAccelDescr hwAccelCtx) ubyte * |
pKeyMaterial, |
|
|
sbyte4 |
keyLen, |
|
|
sbyte4 |
encrypt |
|
) |
| |
Note it is the callers responsibility to free this object after use by calling CRYPTO_INTERFACE_DeleteRC4Ctx. Once created, you can use this context as input to CRYPTO_INTERFACE_DoRC4 to encrypt, decrypt, or use as a stream cipher.
- Parameters
-
pKeyMaterial | Key material to use for the cipher operation. |
keyLen | Length in bytes of the key material. |
encrypt | UNUSED. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ CRYPTO_INTERFACE_DeleteRC4Ctx()
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_DeleteRC4Ctx |
( |
MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx * |
ppCtx | ) |
|
- Parameters
-
ppCtx | Location holding a pointer to the context to be deleted. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ CRYPTO_INTERFACE_DoRC4()
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_DoRC4 |
( |
MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx |
pCtx, |
|
|
ubyte * |
pData, |
|
|
sbyte4 |
dataLen, |
|
|
sbyte4 |
encrypt, |
|
|
ubyte * |
pIv |
|
) |
| |
- Parameters
-
pCtx | A previously created RC4 context. |
pData | The buffer of data to be transformed in-place. |
dataLen | Length of the buffer pData in bytes. |
encrypt | UNUSED. The encryption operation is the same as the decryption operation. |
pIv | UNUSED. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.