Go to the source code of this file.
|
| #define | KSI_BlockSignerHandleList_append(lst, o) KSI_APPLY_TO_NOT_NULL((lst), append, ((lst), (o))) |
| |
| #define | KSI_BlockSignerHandleList_remove(lst, pos, o) KSI_APPLY_TO_NOT_NULL((lst), removeElement, ((lst), (pos), (o))) |
| |
| #define | KSI_BlockSignerHandleList_indexOf(lst, o, i) KSI_APPLY_TO_NOT_NULL((lst), indexOf, ((lst), (o), (i))) |
| |
| #define | KSI_BlockSignerHandleList_insertAt(lst, pos, o) KSI_APPLY_TO_NOT_NULL((lst), insertAt, ((lst), (pos), (o))) |
| |
| #define | KSI_BlockSignerHandleList_replaceAt(lst, pos, o) KSI_APPLY_TO_NOT_NULL((lst), replaceAt, ((lst), (pos), (o))) |
| |
| #define | KSI_BlockSignerHandleList_elementAt(lst, pos, o) KSI_APPLY_TO_NOT_NULL((lst), elementAt, ((lst), (pos), (o))) |
| |
| #define | KSI_BlockSignerHandleList_length(lst) (((lst) != NULL && (lst)->length != NULL) ? (lst)->length((lst)) : 0) |
| |
| #define | KSI_BlockSignerHandleList_sort(lst, cmp) KSI_APPLY_TO_NOT_NULL((lst), sort, ((lst), (cmp))) |
| |
| #define | KSI_BlockSignerHandleList_foldl(lst, foldCtx, foldFn) (((lst) != NULL) ? (((lst)->foldl != NULL) ? ((lst)->foldl((lst), (foldCtx), (foldFn))) : KSI_INVALID_STATE) : KSI_OK) |
| |
| #define | KSI_BlockSigner_add(signer, hsh) KSI_BlockSigner_addLeaf((signer), (hsh), 0, NULL, NULL) |
| |
|
| int | KSI_BlockSignerHandleList_new (KSI_BlockSignerHandleList **list) |
| |
| void | KSI_BlockSignerHandleList_free (KSI_BlockSignerHandleList *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
Add a new leaf to the tree.
- Parameters
-
- Returns
- status code (KSI_OK, when operation succeeded, otherwise an error code).
◆ KSI_BlockSignerHandleList_append
◆ KSI_BlockSignerHandleList_elementAt
| #define KSI_BlockSignerHandleList_elementAt |
( |
|
lst, |
|
|
|
pos, |
|
|
|
o |
|
) |
| KSI_APPLY_TO_NOT_NULL((lst), elementAt, ((lst), (pos), (o))) |
◆ KSI_BlockSignerHandleList_foldl
| #define KSI_BlockSignerHandleList_foldl |
( |
|
lst, |
|
|
|
foldCtx, |
|
|
|
foldFn |
|
) |
| (((lst) != NULL) ? (((lst)->foldl != NULL) ? ((lst)->foldl((lst), (foldCtx), (foldFn))) : KSI_INVALID_STATE) : KSI_OK) |
◆ KSI_BlockSignerHandleList_indexOf
| #define KSI_BlockSignerHandleList_indexOf |
( |
|
lst, |
|
|
|
o, |
|
|
|
i |
|
) |
| KSI_APPLY_TO_NOT_NULL((lst), indexOf, ((lst), (o), (i))) |
◆ KSI_BlockSignerHandleList_insertAt
| #define KSI_BlockSignerHandleList_insertAt |
( |
|
lst, |
|
|
|
pos, |
|
|
|
o |
|
) |
| KSI_APPLY_TO_NOT_NULL((lst), insertAt, ((lst), (pos), (o))) |
◆ KSI_BlockSignerHandleList_length
| #define KSI_BlockSignerHandleList_length |
( |
|
lst | ) |
(((lst) != NULL && (lst)->length != NULL) ? (lst)->length((lst)) : 0) |
◆ KSI_BlockSignerHandleList_remove
| #define KSI_BlockSignerHandleList_remove |
( |
|
lst, |
|
|
|
pos, |
|
|
|
o |
|
) |
| KSI_APPLY_TO_NOT_NULL((lst), removeElement, ((lst), (pos), (o))) |
◆ KSI_BlockSignerHandleList_replaceAt
| #define KSI_BlockSignerHandleList_replaceAt |
( |
|
lst, |
|
|
|
pos, |
|
|
|
o |
|
) |
| KSI_APPLY_TO_NOT_NULL((lst), replaceAt, ((lst), (pos), (o))) |
◆ KSI_BlockSignerHandleList_sort
◆ KSI_BlockSigner
◆ KSI_BlockSignerHandle
◆ KSI_BlockSignerHandleList
◆ 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_BlockSignerHandleList_free()
◆ KSI_BlockSignerHandleList_new()