Go to the source code of this file.
|
| #define | KSI_BlockSignerHandleList_append(lst, o) |
| #define | KSI_BlockSignerHandleList_remove(lst, pos, o) |
| #define | KSI_BlockSignerHandleList_indexOf(lst, o, i) |
| #define | KSI_BlockSignerHandleList_insertAt(lst, pos, o) |
| #define | KSI_BlockSignerHandleList_replaceAt(lst, pos, o) |
| #define | KSI_BlockSignerHandleList_elementAt(lst, pos, o) |
| #define | KSI_BlockSignerHandleList_length(lst) |
| #define | KSI_BlockSignerHandleList_sort(lst, cmp) |
| #define | KSI_BlockSignerHandleList_foldl(lst, foldCtx, foldFn) |
| #define | KSI_BlockSignerHandleList_find(lst, o, f, i) |
| #define | KSI_BlockSigner_add(signer, hsh) |
|
| struct KSI_BlockSignerHandle_list_st | KSI_LIST (KSI_BlockSignerHandle) |
| int | KSI_LIST_FN_NAME (KSI_BlockSignerHandle, new)(KSI_LIST(KSI_BlockSignerHandle) **list) |
| void | KSI_LIST_FN_NAME (KSI_BlockSignerHandle, free)(KSI_LIST(KSI_BlockSignerHandle) *list) |
| int | KSI_BlockSigner_new (KSI_CTX *ctx, KSI_HashAlgorithm algoId, KSI_DataHash *prevLeaf, KSI_OctetString *initVal, KSI_BlockSigner **signer) |
| void | KSI_BlockSigner_free (KSI_BlockSigner *signer) |
| int | KSI_BlockSigner_closeAndSign (KSI_BlockSigner *signer) |
| int | KSI_BlockSigner_close (KSI_BlockSigner *signer, void *) |
| int | KSI_BlockSigner_reset (KSI_BlockSigner *signer) |
| int | KSI_BlockSigner_addLeaf (KSI_BlockSigner *signer, KSI_DataHash *hsh, int level, KSI_MetaData *metaData, KSI_BlockSignerHandle **handle) |
| int | KSI_BlockSigner_getPrevLeaf (const KSI_BlockSigner *signer, KSI_DataHash **prevLeaf) |
| int | KSI_BlockSignerHandle_getSignature (const KSI_BlockSignerHandle *handle, KSI_Signature **sig) |
| void | KSI_BlockSignerHandle_free (KSI_BlockSignerHandle *handle) |
◆ KSI_BlockSigner_add
| #define KSI_BlockSigner_add |
( |
| signer, |
|
|
| hsh ) |
Value:
int KSI_BlockSigner_addLeaf(KSI_BlockSigner *signer, KSI_DataHash *hsh, int level, KSI_MetaData *metaData, KSI_BlockSignerHandle **handle)
Add a new leaf to the tree.
- Parameters
-
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
◆ KSI_BlockSignerHandleList_append
| #define KSI_BlockSignerHandleList_append |
( |
| lst, |
|
|
| o ) |
Value:
#define KSI_APPLY_TO_NOT_NULL(val, fn, args)
Definition types.h:157
◆ KSI_BlockSignerHandleList_elementAt
| #define KSI_BlockSignerHandleList_elementAt |
( |
| lst, |
|
|
| pos, |
|
|
| o ) |
◆ KSI_BlockSignerHandleList_find
| #define KSI_BlockSignerHandleList_find |
( |
| lst, |
|
|
| o, |
|
|
| f, |
|
|
| i ) |
◆ KSI_BlockSignerHandleList_foldl
| #define KSI_BlockSignerHandleList_foldl |
( |
| lst, |
|
|
| foldCtx, |
|
|
| foldFn ) |
Value:(((lst) != NULL) ? (((lst)->foldl != NULL) ? ((lst)->foldl((lst), (foldCtx), (foldFn))) :
KSI_INVALID_STATE) :
KSI_OK)
@ KSI_OK
Definition ksi.h:49
@ KSI_INVALID_STATE
Definition ksi.h:119
◆ KSI_BlockSignerHandleList_indexOf
| #define KSI_BlockSignerHandleList_indexOf |
( |
| lst, |
|
|
| o, |
|
|
| i ) |
◆ KSI_BlockSignerHandleList_insertAt
| #define KSI_BlockSignerHandleList_insertAt |
( |
| lst, |
|
|
| pos, |
|
|
| o ) |
◆ KSI_BlockSignerHandleList_length
| #define KSI_BlockSignerHandleList_length |
( |
| lst | ) |
|
Value:(((lst) != NULL && (lst)->length != NULL) ? (lst)->length((lst)) : 0)
◆ KSI_BlockSignerHandleList_remove
| #define KSI_BlockSignerHandleList_remove |
( |
| lst, |
|
|
| pos, |
|
|
| o ) |
◆ KSI_BlockSignerHandleList_replaceAt
| #define KSI_BlockSignerHandleList_replaceAt |
( |
| lst, |
|
|
| pos, |
|
|
| o ) |
◆ KSI_BlockSignerHandleList_sort
| #define KSI_BlockSignerHandleList_sort |
( |
| lst, |
|
|
| cmp ) |
◆ KSI_BlockSigner
◆ KSI_BlockSignerHandle
◆ KSI_BlockSigner_addLeaf()
Lowlevel function for adding leafs to the aggregation tree.
- Parameters
-
| [in] | signer | Instance of the KSI_BlockSigner. |
| [in] | hsh | Hash value of the leaf node. |
| [in] | level | Level of the leaf node. |
| [in] | metaData | A meta-data object to associate the input hash with, can be NULL. |
| [out] | handle | Handle for the current leaf; may be NULL. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
- Note
- The function does not take ownership of
hsh, metaData nor handle, it is the responsibility of the caller to free the objects.
- See also
- KSI_DataHash_free, KSI_MetaData_free, KSI_BlockSignerHandle_free.
◆ KSI_BlockSigner_close()
◆ KSI_BlockSigner_closeAndSign()
This function finalizes the computation of the tree but does not free the resources.
- Parameters
-
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
◆ KSI_BlockSigner_free()
◆ KSI_BlockSigner_getPrevLeaf()
Getter method for prevLeaf.
- Parameters
-
| [in] | signer | Pointer to KSI_BlockSigner. |
| [out] | prevLeaf | Pointer to receiving pointer. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
- Note
- Ownership of
prevLeaf is passed to the caller who is responsible for freeing the object.
◆ KSI_BlockSigner_new()
Create a new instance of KSI_BlockSigner.
- Parameters
-
| [in] | ctx | KSI context. |
| [in] | algoId | Algorithm to be used for the internal hash node computation. |
| [in] | prevLeaf | For linking two trees, the user may add the last leaf value (can be NULL) |
| [in] | initVal | The initial value for masking. |
| [out] | signer | Pointer to the receiving pointer. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
◆ KSI_BlockSigner_reset()
Resets the block signer to its initial state. This will invalidate all the KSI_BlockSignerHandle instances still remaining.
- Parameters
-
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
◆ KSI_BlockSignerHandle_free()
Cleanup method for the handle.
- Parameters
-
◆ KSI_BlockSignerHandle_getSignature()
This function creates a new instance of a KSI signature and stores it in the output parameter.
- Parameters
-
| [in] | handle | Handle for the block signature. |
| [out] | sig | Pointer to the receiving pointer. |
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
- See also
- KSI_BlockSigner_close, KSI_BlockSigner_free, KSI_BlockSigner_reset.
◆ KSI_LIST()
◆ KSI_LIST_FN_NAME() [1/2]
◆ KSI_LIST_FN_NAME() [2/2]