20 #ifndef BLOCKSIGNER_H_
21 #define BLOCKSIGNER_H_
33 #define KSI_BlockSignerHandleList_append(lst, o) KSI_APPLY_TO_NOT_NULL((lst), append, ((lst), (o)))
34 #define KSI_BlockSignerHandleList_remove(lst, pos, o) KSI_APPLY_TO_NOT_NULL((lst), removeElement, ((lst), (pos), (o)))
35 #define KSI_BlockSignerHandleList_indexOf(lst, o, i) KSI_APPLY_TO_NOT_NULL((lst), indexOf, ((lst), (o), (i)))
36 #define KSI_BlockSignerHandleList_insertAt(lst, pos, o) KSI_APPLY_TO_NOT_NULL((lst), insertAt, ((lst), (pos), (o)))
37 #define KSI_BlockSignerHandleList_replaceAt(lst, pos, o) KSI_APPLY_TO_NOT_NULL((lst), replaceAt, ((lst), (pos), (o)))
38 #define KSI_BlockSignerHandleList_elementAt(lst, pos, o) KSI_APPLY_TO_NOT_NULL((lst), elementAt, ((lst), (pos), (o)))
39 #define KSI_BlockSignerHandleList_length(lst) (((lst) != NULL && (lst)->length != NULL) ? (lst)->length((lst)) : 0)
40 #define KSI_BlockSignerHandleList_sort(lst, cmp) KSI_APPLY_TO_NOT_NULL((lst), sort, ((lst), (cmp)))
41 #define KSI_BlockSignerHandleList_foldl(lst, foldCtx, foldFn) (((lst) != NULL) ? (((lst)->foldl != NULL) ? ((lst)->foldl((lst), (foldCtx), (foldFn))) : KSI_INVALID_STATE) : KSI_OK)
42 #define KSI_BlockSignerHandleList_find(lst, o,f, i) KSI_APPLY_TO_NOT_NULL((lst), find, ((lst), (o), (f), (i)))
84 #define KSI_BlockSigner_add(signer, hsh) KSI_BlockSigner_addLeaf((signer), (hsh), 0, NULL, NULL)
int KSI_BlockSigner_addLeaf(KSI_BlockSigner *signer, KSI_DataHash *hsh, int level, KSI_MetaData *metaData, KSI_BlockSignerHandle **handle)
int KSI_BlockSigner_reset(KSI_BlockSigner *signer)
int KSI_BlockSignerHandle_getSignature(const KSI_BlockSignerHandle *handle, KSI_Signature **sig)
struct KSI_DataHash_st KSI_DataHash
Definition: hash.h:52
void KSI_BlockSigner_free(KSI_BlockSigner *signer)
struct KSI_BlockSignerHandle_st KSI_BlockSignerHandle
Definition: blocksigner.h:30
int KSI_BlockSigner_closeAndSign(KSI_BlockSigner *signer)
enum KSI_HashAlgorithm_en KSI_HashAlgorithm
#define KSI_FN_DEPRECATED(decl, comment)
Definition: common.h:50
int KSI_BlockSigner_new(KSI_CTX *ctx, KSI_HashAlgorithm algoId, KSI_DataHash *prevLeaf, KSI_OctetString *initVal, KSI_BlockSigner **signer)
struct KSI_OctetString_st KSI_OctetString
Definition: types_base.h:145
int KSI_BlockSigner_getPrevLeaf(const KSI_BlockSigner *signer, KSI_DataHash **prevLeaf)
struct KSI_Signature_st KSI_Signature
Definition: types.h:67
#define KSI_DEFINE_LIST(type)
Definition: list.h:159
struct KSI_CTX_st KSI_CTX
Definition: types_base.h:124
struct KSI_BlockSigner_st KSI_BlockSigner
Definition: blocksigner.h:29
void KSI_BlockSignerHandle_free(KSI_BlockSignerHandle *handle)
int KSI_BlockSigner_close(KSI_BlockSigner *signer, void *)
struct KSI_MetaData_st KSI_MetaData
Definition: types.h:42