Guardtime KSI c SDK
Typedefs | Enumerations | Functions
Hashchain Computation

Typedefs

typedef enum KSI_HashChainLinkIdentityType_en KSI_HashChainLinkIdentityType
 

Enumerations

enum  KSI_HashChainLinkIdentityType_en { KSI_IDENTITY_TYPE_LEGACY_ID, KSI_IDENTITY_TYPE_METADATA, KSI_IDENTITY_TYPE_UNKNOWN }
 

Functions

int KSI_HashChain_aggregate (KSI_CTX *, KSI_LIST(KSI_HashChainLink) *chain, const KSI_DataHash *inputHash, int startLevel, KSI_HashAlgorithm algo_id, int *endLevel, KSI_DataHash **outputHash)
 
int KSI_HashChain_aggregateCalendar (KSI_CTX *, KSI_LIST(KSI_HashChainLink) *chain, const KSI_DataHash *inputHash, KSI_DataHash **outputHash)
 
void KSI_HashChainLink_free (KSI_HashChainLink *t)
 
int KSI_HashChainLink_new (KSI_CTX *ctx, KSI_HashChainLink **t)
 
int KSI_HashChainLink_getIsLeft (const KSI_HashChainLink *t, int *isLeft)
 
int KSI_HashChainLink_getLevelCorrection (const KSI_HashChainLink *t, KSI_Integer **levelCorrection)
 
int KSI_HashChainLink_getLegacyId (const KSI_HashChainLink *t, KSI_OctetString **legacyId)
 
int KSI_HashChainLink_getMetaData (const KSI_HashChainLink *t, KSI_MetaDataElement **metaData)
 
int KSI_HashChainLink_getImprint (const KSI_HashChainLink *t, KSI_DataHash **imprint)
 
int KSI_HashChainLink_setIsLeft (KSI_HashChainLink *t, int isLeft)
 
int KSI_HashChainLink_setLevelCorrection (KSI_HashChainLink *t, KSI_Integer *levelCorrection)
 
int KSI_HashChainLink_setLegacyId (KSI_HashChainLink *t, KSI_OctetString *legacyId)
 
int KSI_HashChainLink_setMetaData (KSI_HashChainLink *t, KSI_MetaDataElement *metaData)
 
int KSI_HashChainLink_setImprint (KSI_HashChainLink *t, KSI_DataHash *imprint)
 
int KSI_HashChainLink_fromTlv (KSI_TLV *tlv, KSI_HashChainLink **o)
 
int KSI_HashChainLink_toTlv (KSI_CTX *ctx, const KSI_HashChainLink *o, unsigned tag, int isNonCritical, int isForward, KSI_TLV **tlv)
 
int KSI_HashChainLink_LegacyId_fromTlv (KSI_TLV *tlv, KSI_OctetString **legacyId)
 
int KSI_HashChainLink_LegacyId_toTlv (KSI_CTX *ctx, const KSI_OctetString *legacyId, unsigned tag, int isNonCritical, int isForward, KSI_TLV **tlv)
 
int KSI_CalendarHashChainLink_fromTlv (KSI_TLV *tlv, KSI_CalendarHashChainLink **o)
 
int KSI_CalendarHashChainLink_toTlv (KSI_CTX *ctx, const KSI_CalendarHashChainLink *o, unsigned tag, int isNonCritical, int isForward, KSI_TLV **tlv)
 
void KSI_CalendarHashChain_free (KSI_CalendarHashChain *t)
 
int KSI_CalendarHashChain_new (KSI_CTX *ctx, KSI_CalendarHashChain **t)
 
int KSI_CalendarHashChain_aggregate (KSI_CalendarHashChain *chain, KSI_DataHash **hsh)
 
int KSI_CalendarHashChain_calculateAggregationTime (const KSI_CalendarHashChain *chain, time_t *aggrTime)
 
int KSI_CalendarHashChain_getPublicationTime (const KSI_CalendarHashChain *t, KSI_Integer **publicationTime)
 
int KSI_CalendarHashChain_getAggregationTime (const KSI_CalendarHashChain *t, KSI_Integer **aggregationTime)
 
int KSI_CalendarHashChain_getInputHash (const KSI_CalendarHashChain *t, KSI_DataHash **inputHash)
 
int KSI_CalendarHashChain_getHashChain (const KSI_CalendarHashChain *t, KSI_LIST(KSI_HashChainLink) **hashChain)
 
int KSI_CalendarHashChain_setPublicationTime (KSI_CalendarHashChain *t, KSI_Integer *publicationTime)
 
int KSI_CalendarHashChain_setAggregationTime (KSI_CalendarHashChain *t, KSI_Integer *aggregationTime)
 
int KSI_CalendarHashChain_setInputHash (KSI_CalendarHashChain *t, KSI_DataHash *inputHash)
 
int KSI_CalendarHashChain_setHashChain (KSI_CalendarHashChain *t, KSI_LIST(KSI_HashChainLink) *hashChain)
 
KSI_CalendarHashChainKSI_CalendarHashChain_ref (KSI_CalendarHashChain *o)
 
int KSI_CalendarHashChain_writeBytes (KSI_CalendarHashChain *o, unsigned char *buf, size_t buf_size, size_t *buf_len, int opt)
 
void KSI_HashChainLinkIdentity_free (KSI_HashChainLinkIdentity *identity)
 
int KSI_HashChainLinkIdentity_getType (const KSI_HashChainLinkIdentity *o, KSI_HashChainLinkIdentityType *v)
 
int KSI_HashChainLinkIdentity_getClientId (const KSI_HashChainLinkIdentity *o, KSI_Utf8String **v)
 
int KSI_HashChainLinkIdentity_getMachineId (const KSI_HashChainLinkIdentity *o, KSI_Utf8String **v)
 
int KSI_HashChainLinkIdentity_getSequenceNr (const KSI_HashChainLinkIdentity *o, KSI_Integer **v)
 
int KSI_HashChainLinkIdentity_getRequestTime (const KSI_HashChainLinkIdentity *o, KSI_Integer **v)
 
KSI_HashChainLinkIdentityKSI_HashChainLinkIdentity_ref (KSI_HashChainLinkIdentity *o)
 
int KSI_AggregationHashChain_getIdentity (const KSI_AggregationHashChain *aggr, KSI_HashChainLinkIdentityList **identity)
 
void KSI_AggregationHashChain_free (KSI_AggregationHashChain *aggr)
 
int KSI_AggregationHashChain_new (KSI_CTX *ctx, KSI_AggregationHashChain **out)
 
int KSI_Signature_appendAggregationChain (KSI_Signature *sig, KSI_AggregationHashChain *aggr)
 
int KSI_AggregationHashChain_aggregate (KSI_AggregationHashChain *aggr, int startLevel, int *endLevel, KSI_DataHash **root)
 
int KSI_AggregationHashChain_calculateShape (const KSI_AggregationHashChain *chn, KSI_uint64_t *shape)
 
int KSI_AggregationHashChain_compare (const KSI_AggregationHashChain **left, const KSI_AggregationHashChain **right)
 
int KSI_AggregationHashChain_getAggregationTime (const KSI_AggregationHashChain *aggr, KSI_Integer **aggregationTime)
 
int KSI_AggregationHashChain_getChainIndex (const KSI_AggregationHashChain *aggr, KSI_LIST(KSI_Integer) **chainIndex)
 
int KSI_AggregationHashChain_getInputData (const KSI_AggregationHashChain *aggr, KSI_OctetString **inputData)
 
int KSI_AggregationHashChain_getInputHash (const KSI_AggregationHashChain *aggr, KSI_DataHash **inputHash)
 
int KSI_AggregationHashChain_getAggrHashId (const KSI_AggregationHashChain *aggr, KSI_Integer **aggrHashId)
 
int KSI_AggregationHashChain_getChain (const KSI_AggregationHashChain *aggr, KSI_LIST(KSI_HashChainLink) **chain)
 
int KSI_AggregationHashChain_setAggregationTime (KSI_AggregationHashChain *aggr, KSI_Integer *aggregationTime)
 
int KSI_AggregationHashChain_setChainIndex (KSI_AggregationHashChain *aggr, KSI_LIST(KSI_Integer) *chainIndex)
 
int KSI_AggregationHashChain_setInputData (KSI_AggregationHashChain *aggr, KSI_OctetString *inputData)
 
int KSI_AggregationHashChain_setInputHash (KSI_AggregationHashChain *aggr, KSI_DataHash *inputHash)
 
int KSI_AggregationHashChain_setAggrHashId (KSI_AggregationHashChain *aggr, KSI_Integer *aggrHashId)
 
int KSI_AggregationHashChain_setChain (KSI_AggregationHashChain *aggr, KSI_LIST(KSI_HashChainLink) *chain)
 
KSI_AggregationHashChainKSI_AggregationHashChain_ref (KSI_AggregationHashChain *o)
 
int KSI_AggregationHashChain_writeBytes (KSI_AggregationHashChain *o, unsigned char *buf, size_t buf_size, size_t *buf_len, int opt)
 
int KSI_AggregationHashChainList_aggregate (KSI_AggregationHashChainList *chainList, KSI_CTX *ctx, int level, KSI_DataHash **outputHash)
 

Detailed Description

This module contains hash chain computation methods. General hash chains are represented as a list of KSI_HashChainLink objects, where the first element is also the first sibling.

Typedef Documentation

◆ KSI_HashChainLinkIdentityType

Hash chain link identity type.

Enumeration Type Documentation

◆ KSI_HashChainLinkIdentityType_en

Hash chain link identity type.

Enumerator
KSI_IDENTITY_TYPE_LEGACY_ID 

Legacy client identifier. A client identifier converted from a legacy signature.

KSI_IDENTITY_TYPE_METADATA 

Metadata. A structure that provides the ability to incorporate client identity and other information about the request into the hash chain.

KSI_IDENTITY_TYPE_UNKNOWN 

Function Documentation

◆ KSI_AggregationHashChain_aggregate()

int KSI_AggregationHashChain_aggregate ( KSI_AggregationHashChain aggr,
int  startLevel,
int *  endLevel,
KSI_DataHash **  root 
)

Aggregate the aggregation chain.

Parameters
[in]aggrThe aggregation chain.
[in]startLevelThe level of the first chain link.
[out]endLevelThe level of the root node. Can be NULL.
[out]rootPointer to the receiving pointer. Can be NULL.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).

◆ KSI_AggregationHashChain_calculateShape()

int KSI_AggregationHashChain_calculateShape ( const KSI_AggregationHashChain chn,
KSI_uint64_t shape 
)

This function will represent the shape of the aggregation chain. The bits represent the path from the root of the tree to the location of a hash value as a sequence of moves from a parent node in the tree to either the left or right child (bit values 0 and 1, respectively). Each bit sequence starts with a 1-bit to make sure no left most 0-bits are lost.

Parameters
[in]chnThe aggregation chain.
[out]shapePointer to the receiving variable.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).

◆ KSI_AggregationHashChain_compare()

int KSI_AggregationHashChain_compare ( const KSI_AggregationHashChain **  left,
const KSI_AggregationHashChain **  right 
)

◆ KSI_AggregationHashChain_free()

void KSI_AggregationHashChain_free ( KSI_AggregationHashChain aggr)

Cleanup method for the aggregation hash chain.

Parameters
[in]aggrAggregation hash chain.

◆ KSI_AggregationHashChain_getAggregationTime()

int KSI_AggregationHashChain_getAggregationTime ( const KSI_AggregationHashChain aggr,
KSI_Integer **  aggregationTime 
)

◆ KSI_AggregationHashChain_getAggrHashId()

int KSI_AggregationHashChain_getAggrHashId ( const KSI_AggregationHashChain aggr,
KSI_Integer **  aggrHashId 
)

◆ KSI_AggregationHashChain_getChain()

int KSI_AggregationHashChain_getChain ( const KSI_AggregationHashChain aggr,
KSI_LIST(KSI_HashChainLink) **  chain 
)

◆ KSI_AggregationHashChain_getChainIndex()

int KSI_AggregationHashChain_getChainIndex ( const KSI_AggregationHashChain aggr,
KSI_LIST(KSI_Integer) **  chainIndex 
)

◆ KSI_AggregationHashChain_getIdentity()

int KSI_AggregationHashChain_getIdentity ( const KSI_AggregationHashChain aggr,
KSI_HashChainLinkIdentityList **  identity 
)

Get aggregation hash chain identity. The returned list consists of individual hash chain link identities. The identities in the list are ordered - the higher-link identity is before lower-link identity.

Parameters
[in]aggrAggregation hash chain.
[in]identityPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).

◆ KSI_AggregationHashChain_getInputData()

int KSI_AggregationHashChain_getInputData ( const KSI_AggregationHashChain aggr,
KSI_OctetString **  inputData 
)

◆ KSI_AggregationHashChain_getInputHash()

int KSI_AggregationHashChain_getInputHash ( const KSI_AggregationHashChain aggr,
KSI_DataHash **  inputHash 
)

◆ KSI_AggregationHashChain_new()

int KSI_AggregationHashChain_new ( KSI_CTX ctx,
KSI_AggregationHashChain **  out 
)

Aggregation hash chain constructor.

Parameters
[in]ctxKSI context.
[out]outPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).

◆ KSI_AggregationHashChain_ref()

KSI_AggregationHashChain* KSI_AggregationHashChain_ref ( KSI_AggregationHashChain o)

◆ KSI_AggregationHashChain_setAggregationTime()

int KSI_AggregationHashChain_setAggregationTime ( KSI_AggregationHashChain aggr,
KSI_Integer aggregationTime 
)

◆ KSI_AggregationHashChain_setAggrHashId()

int KSI_AggregationHashChain_setAggrHashId ( KSI_AggregationHashChain aggr,
KSI_Integer aggrHashId 
)

◆ KSI_AggregationHashChain_setChain()

int KSI_AggregationHashChain_setChain ( KSI_AggregationHashChain aggr,
KSI_LIST(KSI_HashChainLink) *  chain 
)

◆ KSI_AggregationHashChain_setChainIndex()

int KSI_AggregationHashChain_setChainIndex ( KSI_AggregationHashChain aggr,
KSI_LIST(KSI_Integer) *  chainIndex 
)

◆ KSI_AggregationHashChain_setInputData()

int KSI_AggregationHashChain_setInputData ( KSI_AggregationHashChain aggr,
KSI_OctetString inputData 
)

◆ KSI_AggregationHashChain_setInputHash()

int KSI_AggregationHashChain_setInputHash ( KSI_AggregationHashChain aggr,
KSI_DataHash inputHash 
)

◆ KSI_AggregationHashChain_writeBytes()

int KSI_AggregationHashChain_writeBytes ( KSI_AggregationHashChain o,
unsigned char *  buf,
size_t  buf_size,
size_t *  buf_len,
int  opt 
)
  • This function serializes the # KSI_AggregationHashChain object and writes the result into a pre-allocated buffer. *
    Parameters
    [in]oObject to be serialized. *
    [in]bufPointer to pre-allocated buffer. *
    [in]buf_sizeBuffer size. *
    [out]buf_lenSerialized buffer length. *
    [in]optSerialization options. *
    Returns
    status code (KSI_OK, when operation succeeded, otherwise an error code).

◆ KSI_AggregationHashChainList_aggregate()

int KSI_AggregationHashChainList_aggregate ( KSI_AggregationHashChainList chainList,
KSI_CTX ctx,
int  level,
KSI_DataHash **  outputHash 
)

This function aggregates the aggregation hash chain list and returns the result hash via outputHash parameter.

Parameters
[in]chainListHash chain list (list of hash chains).
[in]ctxKSI context.
[in]levelAggregation level.
[out]outputHashPointer to the receiving pointer to data hash object.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
The output memory buffer belongs to the caller and needs to be freed by the caller using KSI_free.

◆ KSI_CalendarHashChain_aggregate()

int KSI_CalendarHashChain_aggregate ( KSI_CalendarHashChain chain,
KSI_DataHash **  hsh 
)

◆ KSI_CalendarHashChain_calculateAggregationTime()

int KSI_CalendarHashChain_calculateAggregationTime ( const KSI_CalendarHashChain chain,
time_t *  aggrTime 
)

◆ KSI_CalendarHashChain_free()

void KSI_CalendarHashChain_free ( KSI_CalendarHashChain t)

KSI_CalendarHashChain

◆ KSI_CalendarHashChain_getAggregationTime()

int KSI_CalendarHashChain_getAggregationTime ( const KSI_CalendarHashChain t,
KSI_Integer **  aggregationTime 
)

◆ KSI_CalendarHashChain_getHashChain()

int KSI_CalendarHashChain_getHashChain ( const KSI_CalendarHashChain t,
KSI_LIST(KSI_HashChainLink) **  hashChain 
)

◆ KSI_CalendarHashChain_getInputHash()

int KSI_CalendarHashChain_getInputHash ( const KSI_CalendarHashChain t,
KSI_DataHash **  inputHash 
)

◆ KSI_CalendarHashChain_getPublicationTime()

int KSI_CalendarHashChain_getPublicationTime ( const KSI_CalendarHashChain t,
KSI_Integer **  publicationTime 
)

◆ KSI_CalendarHashChain_new()

int KSI_CalendarHashChain_new ( KSI_CTX ctx,
KSI_CalendarHashChain **  t 
)

◆ KSI_CalendarHashChain_ref()

KSI_CalendarHashChain* KSI_CalendarHashChain_ref ( KSI_CalendarHashChain o)

◆ KSI_CalendarHashChain_setAggregationTime()

int KSI_CalendarHashChain_setAggregationTime ( KSI_CalendarHashChain t,
KSI_Integer aggregationTime 
)

◆ KSI_CalendarHashChain_setHashChain()

int KSI_CalendarHashChain_setHashChain ( KSI_CalendarHashChain t,
KSI_LIST(KSI_HashChainLink) *  hashChain 
)

◆ KSI_CalendarHashChain_setInputHash()

int KSI_CalendarHashChain_setInputHash ( KSI_CalendarHashChain t,
KSI_DataHash inputHash 
)

◆ KSI_CalendarHashChain_setPublicationTime()

int KSI_CalendarHashChain_setPublicationTime ( KSI_CalendarHashChain t,
KSI_Integer publicationTime 
)

◆ KSI_CalendarHashChain_writeBytes()

int KSI_CalendarHashChain_writeBytes ( KSI_CalendarHashChain o,
unsigned char *  buf,
size_t  buf_size,
size_t *  buf_len,
int  opt 
)
  • This function serializes the # KSI_CalendarHashChain object and writes the result into a pre-allocated buffer. *
    Parameters
    [in]oObject to be serialized. *
    [in]bufPointer to pre-allocated buffer. *
    [in]buf_sizeBuffer size. *
    [out]buf_lenSerialized buffer length. *
    [in]optSerialization options. *
    Returns
    status code (KSI_OK, when operation succeeded, otherwise an error code).

◆ KSI_CalendarHashChainLink_fromTlv()

int KSI_CalendarHashChainLink_fromTlv ( KSI_TLV tlv,
KSI_CalendarHashChainLink **  o 
)

Function to convert a plain KSI_TLV to a KSI_CalendarHashChainLink . The TLV meta data (i.e. tag, length and flags) are not preserved.

Parameters
[in]tlvPointer to KSI_TLV.
[out]oPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
See also
KSI_CalendarHashChainLink_fromTlv

◆ KSI_CalendarHashChainLink_toTlv()

int KSI_CalendarHashChainLink_toTlv ( KSI_CTX ctx,
const KSI_CalendarHashChainLink o,
unsigned  tag,
int  isNonCritical,
int  isForward,
KSI_TLV **  tlv 
)

Function to convert a KSI_CalendarHashChainLink to a plain KSI_TLV object.

Parameters
[in]ctxKSI context.
[in]oPointer to KSI_CalendarHashChainLink
[in]tagTag value of the KSI_TLV
[in]isNonCriticalFlag is-non-critical.
[in]isForwardFlag is-forward.
[out]tlvPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
See also
KSI_CalendarHashChainLink_fromTlv, KSI_TLV_free

◆ KSI_HashChain_aggregate()

int KSI_HashChain_aggregate ( KSI_CTX ,
KSI_LIST(KSI_HashChainLink) *  chain,
const KSI_DataHash inputHash,
int  startLevel,
KSI_HashAlgorithm  algo_id,
int *  endLevel,
KSI_DataHash **  outputHash 
)

This function aggregates the hashchain and returns the result hash via outputHash parameter.

Parameters
[in]chainHash chain (list of hash chain links)
[in]inputHashInput hash value.
[in]startLevelThe initial level of this hash chain.
[in]algo_idHash algorithm to be used to calculate the next value.
[out]endLevelPointer to the receiving end level variable.
[out]outputHashPointer to the receiving pointer to data hash object.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).

◆ KSI_HashChain_aggregateCalendar()

int KSI_HashChain_aggregateCalendar ( KSI_CTX ,
KSI_LIST(KSI_HashChainLink) *  chain,
const KSI_DataHash inputHash,
KSI_DataHash **  outputHash 
)

This function aggregates the calendar hash chain and returns the result hash via outputHash parameter.

Parameters
[in]chainHash chain.
[in]inputHashInput hash value.
[out]outputHashPointer to the receiving pointer to data hash object.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).

◆ KSI_HashChainLink_free()

void KSI_HashChainLink_free ( KSI_HashChainLink t)

Free the resources of a KSI_HashChainLink

Parameters
[in]tPointer to KSI_HashChainLink

◆ KSI_HashChainLink_fromTlv()

int KSI_HashChainLink_fromTlv ( KSI_TLV tlv,
KSI_HashChainLink **  o 
)

Function to convert a plain KSI_TLV to a KSI_HashChainLink . The TLV meta data (i.e. tag, length and flags) are not preserved.

Parameters
[in]tlvPointer to KSI_TLV.
[out]oPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
See also
KSI_HashChainLink_fromTlv

◆ KSI_HashChainLink_getImprint()

int KSI_HashChainLink_getImprint ( const KSI_HashChainLink t,
KSI_DataHash **  imprint 
)

Getter method for imprint.

Parameters
[in]tPointer to KSI_HashChainLink.
[out]imprintPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
The output object still belongs to t.

◆ KSI_HashChainLink_getIsLeft()

int KSI_HashChainLink_getIsLeft ( const KSI_HashChainLink t,
int *  isLeft 
)

Getter method for isLeft.

Parameters
[in]tPointer to KSI_HashChainLink.
[out]isLeftPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).

◆ KSI_HashChainLink_getLegacyId()

int KSI_HashChainLink_getLegacyId ( const KSI_HashChainLink t,
KSI_OctetString **  legacyId 
)

Getter method for legacyId.

Parameters
[in]tPointer to KSI_HashChainLink.
[out]legacyIdPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
The output object still belongs to t.

◆ KSI_HashChainLink_getLevelCorrection()

int KSI_HashChainLink_getLevelCorrection ( const KSI_HashChainLink t,
KSI_Integer **  levelCorrection 
)

Getter method for levelCorrection.

Parameters
[in]tPointer to KSI_HashChainLink.
[out]levelCorrectionPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
The output object still belongs to t.

◆ KSI_HashChainLink_getMetaData()

int KSI_HashChainLink_getMetaData ( const KSI_HashChainLink t,
KSI_MetaDataElement **  metaData 
)

Getter method for metaData.

Parameters
[in]tPointer to KSI_HashChainLink.
[out]metaDataPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
The output object still belongs to t.

◆ KSI_HashChainLink_LegacyId_fromTlv()

int KSI_HashChainLink_LegacyId_fromTlv ( KSI_TLV tlv,
KSI_OctetString **  legacyId 
)

◆ KSI_HashChainLink_LegacyId_toTlv()

int KSI_HashChainLink_LegacyId_toTlv ( KSI_CTX ctx,
const KSI_OctetString legacyId,
unsigned  tag,
int  isNonCritical,
int  isForward,
KSI_TLV **  tlv 
)

◆ KSI_HashChainLink_new()

int KSI_HashChainLink_new ( KSI_CTX ctx,
KSI_HashChainLink **  t 
)

Creates a new empty KSI_HashChainLink.

Parameters
[in]ctxKSI context.
[out]tPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
See also
KSI_HashChainLink_free

◆ KSI_HashChainLink_setImprint()

int KSI_HashChainLink_setImprint ( KSI_HashChainLink t,
KSI_DataHash imprint 
)

Setter method for imprint.

Parameters
[in]tPointer to KSI_HashChainLink.
[in]imprintPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
After calling the setter, the the object belongs to t and will be freed by KSI_HashChainLink_free.

◆ KSI_HashChainLink_setIsLeft()

int KSI_HashChainLink_setIsLeft ( KSI_HashChainLink t,
int  isLeft 
)

Setter method for isLeft.

Parameters
[in]tPointer to KSI_HashChainLink.
[in]isLeftPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).

◆ KSI_HashChainLink_setLegacyId()

int KSI_HashChainLink_setLegacyId ( KSI_HashChainLink t,
KSI_OctetString legacyId 
)

Setter method for legacyId.

Parameters
[in]tPointer to KSI_HashChainLink.
[in]legacyIdPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
After calling the setter, the the object belongs to t and will be freed by KSI_HashChainLink_free.

◆ KSI_HashChainLink_setLevelCorrection()

int KSI_HashChainLink_setLevelCorrection ( KSI_HashChainLink t,
KSI_Integer levelCorrection 
)

Setter method for levelCorrection.

Parameters
[in]tPointer to KSI_HashChainLink.
[in]levelCorrectionPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
After calling the setter, the the object belongs to t and will be freed by KSI_HashChainLink_free.

◆ KSI_HashChainLink_setMetaData()

int KSI_HashChainLink_setMetaData ( KSI_HashChainLink t,
KSI_MetaDataElement metaData 
)

Setter method for metaData.

Parameters
[in]tPointer to KSI_HashChainLink.
[in]metaDataPointer to receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
After calling the setter, the the object belongs to t and will be freed by KSI_HashChainLink_free.

◆ KSI_HashChainLink_toTlv()

int KSI_HashChainLink_toTlv ( KSI_CTX ctx,
const KSI_HashChainLink o,
unsigned  tag,
int  isNonCritical,
int  isForward,
KSI_TLV **  tlv 
)

Function to convert a KSI_HashChainLink to a plain KSI_TLV object.

Parameters
[in]ctxKSI context.
[in]oPointer to KSI_HashChainLink
[in]tagTag value of the KSI_TLV
[in]isNonCriticalFlag is-non-critical.
[in]isForwardFlag is-forward.
[out]tlvPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
See also
KSI_HashChainLink_fromTlv, KSI_TLV_free

◆ KSI_HashChainLinkIdentity_free()

void KSI_HashChainLinkIdentity_free ( KSI_HashChainLinkIdentity identity)

◆ KSI_HashChainLinkIdentity_getClientId()

int KSI_HashChainLinkIdentity_getClientId ( const KSI_HashChainLinkIdentity o,
KSI_Utf8String **  v 
)

◆ KSI_HashChainLinkIdentity_getMachineId()

int KSI_HashChainLinkIdentity_getMachineId ( const KSI_HashChainLinkIdentity o,
KSI_Utf8String **  v 
)

◆ KSI_HashChainLinkIdentity_getRequestTime()

int KSI_HashChainLinkIdentity_getRequestTime ( const KSI_HashChainLinkIdentity o,
KSI_Integer **  v 
)

◆ KSI_HashChainLinkIdentity_getSequenceNr()

int KSI_HashChainLinkIdentity_getSequenceNr ( const KSI_HashChainLinkIdentity o,
KSI_Integer **  v 
)

◆ KSI_HashChainLinkIdentity_getType()

int KSI_HashChainLinkIdentity_getType ( const KSI_HashChainLinkIdentity o,
KSI_HashChainLinkIdentityType v 
)

◆ KSI_HashChainLinkIdentity_ref()

KSI_HashChainLinkIdentity* KSI_HashChainLinkIdentity_ref ( KSI_HashChainLinkIdentity o)

◆ KSI_Signature_appendAggregationChain()

int KSI_Signature_appendAggregationChain ( KSI_Signature sig,
KSI_AggregationHashChain aggr 
)