Cryptographic Interface header file for declaring SHA256 functions.
More...
Go to the source code of this file.
|
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_SHA224_cloneCtx (MOC_HASH(hwAccelDescr hwAccelCtx) SHA224_CTX *pDest, SHA224_CTX *pSrc) |
| Makes a clone of a previously allocated SHA224_CTX . More...
|
|
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_SHA224_completeDigest (MOC_HASH(hwAccelDescr hwAccelCtx) const ubyte *pData, ubyte4 dataLen, ubyte *pShaOutput) |
| Perform a SHA224 digest in one step. More...
|
|
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_SHA224_finalDigest (MOC_HASH(hwAccelDescr hwAccelCtx) SHA224_CTX *pContext, ubyte *pOutput) |
| Finalize a digest operation and recieve the result. More...
|
|
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_SHA224_initDigest (MOC_HASH(hwAccelDescr hwAccelCtx) SHA224_CTX *pContext) |
| Initialize a SHA224 context for a new digest operation. More...
|
|
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_SHA256_allocDigest (MOC_HASH(hwAccelDescr hwAccelCtx) BulkCtx *pp_context) |
| Allocate a new SHA context. More...
|
|
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_SHA256_cloneCtx (MOC_HASH(hwAccelDescr hwAccelCtx) SHA256_CTX *pDest, SHA256_CTX *pSrc) |
| Makes a clone of a previously allocated SHA256_CTX . More...
|
|
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_SHA256_completeDigest (MOC_HASH(hwAccelDescr hwAccelCtx) const ubyte *pData, ubyte4 dataLen, ubyte *pShaOutput) |
| Perform a SHA256 digest in one step. More...
|
|
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_SHA256_finalDigest (MOC_HASH(hwAccelDescr hwAccelCtx) SHA256_CTX *pContext, ubyte *pOutput) |
| Finalize a digest operation and recieve the result. More...
|
|
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_SHA256_freeDigest (MOC_HASH(hwAccelDescr hwAccelCtx) BulkCtx *pp_context) |
| Free a SHA224 or SHA256 context previously allocated with CRYPTO_INTERFACE_SHA1_allocDigest . More...
|
|
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_SHA256_initDigest (MOC_HASH(hwAccelDescr hwAccelCtx) SHA256_CTX *pContext) |
| Initialize a SHA256 context for a new digest operation. More...
|
|
MOC_EXTERN MSTATUS | CRYPTO_INTERFACE_SHA256_updateDigest (MOC_HASH(hwAccelDescr hwAccelCtx) SHA256_CTX *pContext, const ubyte *pData, ubyte4 dataLen) |
| Update a digest operation. More...
|
|
◆ CRYPTO_INTERFACE_SHA224_cloneCtx()
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_SHA224_cloneCtx |
( |
MOC_HASH(hwAccelDescr hwAccelCtx) SHA224_CTX * |
pDest, |
|
|
SHA224_CTX * |
pSrc |
|
) |
| |
- Parameters
-
pDest | Pointer to an already allocated destination context. |
pSrc | Pointer to the context to be copied. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ CRYPTO_INTERFACE_SHA224_completeDigest()
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_SHA224_completeDigest |
( |
MOC_HASH(hwAccelDescr hwAccelCtx) const ubyte * |
pData, |
|
|
ubyte4 |
dataLen, |
|
|
ubyte * |
pShaOutput |
|
) |
| |
- Parameters
-
pData | Data to digest. |
dataLen | Length in bytes of the data to digest. |
pShaOutput | Buffer of size SHA224_RESULT_SIZE that will recieve the digest. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ CRYPTO_INTERFACE_SHA224_finalDigest()
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_SHA224_finalDigest |
( |
MOC_HASH(hwAccelDescr hwAccelCtx) SHA224_CTX * |
pContext, |
|
|
ubyte * |
pOutput |
|
) |
| |
- Parameters
-
pContext | The digest context used to update the data. |
pOutput | Buffer of size SHA224_RESULT_SIZE that will recieve the digest. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ CRYPTO_INTERFACE_SHA224_initDigest()
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_SHA224_initDigest |
( |
MOC_HASH(hwAccelDescr hwAccelCtx) SHA224_CTX * |
pContext | ) |
|
- Parameters
-
pContext | The SHA224 context to initialize. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ CRYPTO_INTERFACE_SHA256_allocDigest()
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_SHA256_allocDigest |
( |
MOC_HASH(hwAccelDescr hwAccelCtx) BulkCtx * |
pp_context | ) |
|
Note that SHA224 and SHA256 share this function. It is the callers responsibility to free this object after use by calling CRYPTO_INTERFACE_SHA256_freeDigest
.
- Parameters
-
pp_context | On return, pointer to the address of the allocated context. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ CRYPTO_INTERFACE_SHA256_cloneCtx()
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_SHA256_cloneCtx |
( |
MOC_HASH(hwAccelDescr hwAccelCtx) SHA256_CTX * |
pDest, |
|
|
SHA256_CTX * |
pSrc |
|
) |
| |
- Parameters
-
pDest | Pointer to an already allocated destination context. |
pSrc | Pointer to the context to be copied. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ CRYPTO_INTERFACE_SHA256_completeDigest()
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_SHA256_completeDigest |
( |
MOC_HASH(hwAccelDescr hwAccelCtx) const ubyte * |
pData, |
|
|
ubyte4 |
dataLen, |
|
|
ubyte * |
pShaOutput |
|
) |
| |
- Parameters
-
pData | Data to digest. |
dataLen | Length in bytes of the data to digest. |
pShaOutput | Buffer of size SHA256_RESULT_SIZE that will recieve the digest. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ CRYPTO_INTERFACE_SHA256_finalDigest()
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_SHA256_finalDigest |
( |
MOC_HASH(hwAccelDescr hwAccelCtx) SHA256_CTX * |
pContext, |
|
|
ubyte * |
pOutput |
|
) |
| |
- Parameters
-
pContext | The digest context used to update the data. |
pOutput | Buffer of size SHA256_RESULT_SIZE that will recieve the digest. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ CRYPTO_INTERFACE_SHA256_freeDigest()
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_SHA256_freeDigest |
( |
MOC_HASH(hwAccelDescr hwAccelCtx) BulkCtx * |
pp_context | ) |
|
- Parameters
-
pp_context | Context to be freed. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ CRYPTO_INTERFACE_SHA256_initDigest()
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_SHA256_initDigest |
( |
MOC_HASH(hwAccelDescr hwAccelCtx) SHA256_CTX * |
pContext | ) |
|
- Parameters
-
pContext | The SHA256 context to initialize. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ CRYPTO_INTERFACE_SHA256_updateDigest()
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_SHA256_updateDigest |
( |
MOC_HASH(hwAccelDescr hwAccelCtx) SHA256_CTX * |
pContext, |
|
|
const ubyte * |
pData, |
|
|
ubyte4 |
dataLen |
|
) |
| |
Note that SHA224 and SHA256 share this function.
- Parameters
-
pContext | The digest context to be updated. |
pData | The data to update the context with. |
dataLen | Length in bytes of the update data. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.