📄 nzt.h
字号:
* tdu {IN/OUT} Output tdu. * * NOTES * * RETURNS * NZERROR_OK Success. * NZERROR_TK_CANTGROW Needed to grow TDU buffer but could not. * NZERROR_TK_NOTOPEN Persona is not open. * NZERROR_TK_NOTSUPP Function not supported with persona. */#ifdef __STDC__nzerror nztHash(nzctx *, nzttPersona *, nzttces, ub4, ub1 *, nzttBufferBlock *);#elsenzerror nztHash(/*_ nzctx *, nzttPersona *, nzttces, ub4, ub1 *, nzttBufferBlock * _*/);#endif /* __STDC __*//*----------------------- nztSeedRandom -----------------------*//* * NAME * nztSeedRandom - Seed the random function * * PARAMETERS * osscntxt {IN} OSS context. * persona {IN} Persona. * seedlen {IN} Length of seed. * seed {IN} Seed. * * NOTES * * RETURNS * NZERROR_OK Success. * NZERROR_TK_NOTOPEN Persona is not open. * NZERROR_TK_NOTSUPP Function not supported with persona. */#ifdef __STDC__nzerror nztSeedRandom(nzctx *, nzttPersona *, ub4, ub1 *);#elsenzerror nztSeedRandom(/*_ nzctx *, nzttPersona *, ub4, ub1 * _*/);#endif /* __STDC __*//*--------------------- nztrb_RandomBytes ---------------------*//* * NAME * nztrb_RandomBytes - Generate a buffer random bytes. * * PARAMETERS * osscntxt {IN} OSS context. * persona {IN} Persona. * nbytes {IN} Number of bytes desired. * out {IN/OUT} Buffer block for bytes. * * NOTES * * RETURNS * NZERROR_OK Success. * NZERROR_TK_CANTGROW Needed to grow TDU buffer but could not. * NZERROR_TK_NOTOPEN Persona is not open. * NZERROR_TK_NOTSUPP Function not supported with persona. */#ifdef __STDC__nzerror nztrb_RandomBytes(nzctx *, nzttPersona *, ub4, nzttBufferBlock *);#elsenzerror nztrb_RandomBytes(/*_ nzctx *, nzttPersona *, ub4, nzttBufferBlock * _*/);#endif /* __STDC __*//*-------------------- nztrn_RandomNumber --------------------*//* * NAME * nztrn_RandomNumber - Generate a random number * * PARAMETERS * osscntxt {IN} OSS context. * persona {IN} Persona. * num {OUT} Number. * * NOTES * * RETURNS * NZERROR_OK Success. * NZERROR_TK_NOTOPEN Persona is not open. * NZERROR_TK_NOTSUPP Function not supported with persona. */#ifdef __STDC__nzerror nztrn_RandomNumber(nzctx *, nzttPersona *, uword *);#elsenzerror nztrn_RandomNumber(/*_ nzctx *, nzttPersona *, uword * _*/);#endif /* __STDC __*//*---------------------- nztbbInitBlock ----------------------*//* * NAME * nztbbInitBlock - Initialize a buffer block. * * PARAMETERS * osscntxt {IN} OSS context. * block {IN/OUT} Buffer block. * * NOTES * The buffer block is initialized to be empty (all members are set * to 0/NULL). Such a block will be allocated memory as needed. * * RETURNS * NZERROR_OK Success. */#ifdef __STDC__nzerror nztbbInitBlock(nzctx *, nzttBufferBlock *);#elsenzerror nztbbInitBlock(/*_ nzctx *, nzttBufferBlock * _*/);#endif /* __STDC __*//*---------------------- nztbbReuseBlock ----------------------*//* * NAME * nztbbReuseBlock - Reuse an already initialized and possibly used block. * * PARAMETERS * osscntxt {IN} OSS context. * block {IN/OUT} Buffer block. * * NOTES * This function simply sets the used length member of the buffer * block to 0. If the block already has memory allocated to it, * this will cause it to be reused. * * RETURNS * NZERROR_OK Success. */#ifdef __STDC__nzerror nztbbReuseBlock(nzctx *, nzttBufferBlock *);#elsenzerror nztbbReuseBlock(/*_ nzctx *, nzttBufferBlock * _*/);#endif /* __STDC __*//*---------------------- nztbbSizeBlock ----------------------*//* * NAME * nztbbSizeBlock - Size an initialized block to a particular size. * * PARAMETERS * osscntxt {IN} OSS context. * len {IN} Minimum number of unused bytes desired. * block {IN/OUT} Buffer block. * * NOTES * * RETURNS * NZERROR_OK Success. */#ifdef __STDC__nzerror nztbbSizeBlock(nzctx *, ub4, nzttBufferBlock *);#elsenzerror nztbbSizeBlock(/*_ nzctx *, ub4, nzttBufferBlock * _*/);#endif /* __STDC __*//*----------------------- nztbbGrowBlock -----------------------*//* * NAME * nzbbGrowBlock - Increase the size of the buffer block. * * PARAMETERS * osscntxt {IN} OSS context. * inc {IN} Number of bytes to increase. * block {IN/OUT} Buffer block. * * NOTES * * RETURNS * NZERROR_OK Success. */#ifdef __STDC__nzerror nztbbGrowBlock(nzctx *, ub4, nzttBufferBlock *);#elsenzerror nztbbGrowBlock(/*_ nzctx *, ub4, nzttBufferBlock * _*/);#endif /* __STDC __*//*---------------------- nztbbPurgeBlock ----------------------*//* * NAME * nztbbPurgeBlock - Purge a buffer block of its memory. * * PARAMETERS * osscntxt {IN} OSS context. * block {IN/OUT} Buffer block. * * NOTES * The memory used by the buffer block as the buffer is released. * The buffer block itself is not affected. * * RETURNS * NZERROR_OK Success. */#ifdef __STDC__nzerror nztbbPurgeBlock(nzctx *, nzttBufferBlock *);#elsenzerror nztbbPurgeBlock(/*_ nzctx *, nzttBufferBlock * _*/);#endif /* __STDC __*//*----------------------- nztbbSetBlock -----------------------*//* * NAME * nztbbSetBlock - Set a buffer block to a known state. * * PARAMETERS * osscntxt {IN} OSS context. * flags {IN} Flags to set. * buflen {IN} Length of buffer. * usedlen {IN} Used length. * buffer {IN} Buffer. * block {IN/OUT} Buffer block * * NOTES * If buflen > 0, objlen == 0, and obj == NULL, then buflen bytes * of memory is allocated and a pointer is stored in the buffer * block. * * The buffer parameter remains unchanged. * * RETURNS * NZERROR_OK Success. */#ifdef __STDC__nzerror nztbbSetBlock(nzctx *, uword, ub4, ub4, ub1 *, nzttBufferBlock *);#elsenzerror nztbbSetBlock(/*_ nzctx *, uword, ub4, ub4, ub1 *, nzttBufferBlock * _*/);#endif /* __STDC __*//*--------------------- nztiGetSecInfo ---------------------*//* * NAME * nztiGetSecInfo - Get some security information for SSL * * PARAMETERS * Name {IN/OUT} Description * osscntxt {IN} OSS context. * persona {IN} persona * dname {OUT} distinguished name of the certificate * dnamelen {OUT} length of the distinguished name * issuername {OUT} issuer name of the certificate * certhash {OUT} SHA1 hash of the certificate * certhashlen{OUT} length of the hash * NOTES * This function allocate memories for issuername, certhash, and dname. * To deallocate memory for those params, you should call nztdbuf_DestroyBuf. * RETURNS * */#ifdef __STDC__nzerror nztiGetSecInfo(nzctx *, nzttPersona *, text **, ub4 *, text **, ub4 *, ub1 **, ub4 *);#elsenzerror nztiGetSecInfo(/*_ nzctx *, nzttPersona *, text **, ub4 *, text **, ub4 *, ub1 **, ub4 * _*/);#endif /* __STDC__ *//*---------------------- nztiGetDName ----------------------*//* * NAME * nztiGetDName - Get the distinguished name for the given identity * * PARAMETERS * Name {IN/OUT} Description * osscntxt {IN} OSS context. * identity {IN} identity need to get dname from * dn {OUT} distinguished name * dnlen {OUT} length of the dname * * NOTES * * RETURNS * */#ifdef __STDC__nzerror nztiGetDName(nzctx *, nzttIdentity *, text **, ub4 *);#elsenzerror nztiGetDName(/*_ nzctx *, nzttIdentity *, text **, ub4 * _*/);#endif /* __STDC__ *//*------------------- nztiGetIssuerName -------------------*//* * NAME * nztiGetIssuerName - Get IssuerName for the given identity * * PARAMETERS * Name {IN/OUT} Description * osscntxt {IN} OSS context. * identity {IN} identity need to get issuername from * issuername {OUT} issuer's name * issuernamelen {OUT} length of the issuer's name * * NOTES * * RETURNS * */#ifdef __STDC__nzerror nztiGetIssuerName(nzctx *, nzttIdentity *, text **, ub4 *);#elsenzerror nztiGetIssuerName(/*_ nzctx *, nzttIdentity *, text **, ub4 * _*/);#endif /* __STDC__ *//*-------------------- nztgch_GetCertHash --------------------*//* * NAME * nztgch_GetCertHash - Get SHA1 hash for the certificate of the identity * * PARAMETERS * Name {IN/OUT} Description * osscntxt {IN} OSS context. * identity {IN} identity need to get issuername from * certHash {OUT} certHash buffer * hashLen {OUT} length of the certHash * * NOTES * Need to call nztdbuf_DestroyBuf to deallocate memory for certHash. * RETURNS * */#ifdef __STDC__nzerror nztgch_GetCertHash(nzctx *, nzttIdentity *, ub1 **, ub4 *);#elsenzerror nztgch_GetCertHash(/*_ nzctx *, nzttIdentity *, ub1 **, ub4 * _*/);#endif /* __STDC__ *//*-------------------- nztdbuf_DestroyBuf --------------------*//* * NAME * nztdbuf_DestroyBuf - Deallocation funtions for ub1 and text buffer * * PARAMETERS * Name {IN/OUT} Description * osscntxt {IN} OSS context. * buf {IN} Allocated buffer to be destroyed. * * NOTES * * RETURNS * */#ifdef __STDC__nzerror nztdbuf_DestroyBuf( nzctx *, dvoid **);#elsenzerror nztdbuf_DestroyBuf(/*_ nzctx *, dvoid ** _*/);#endif /* __STDC__ *//*----------------------- nztGetCertChain -----------------------*//* * NAME * nztGetCertChain - * * PARAMETERS * Name {IN/OUT} Description * osscntxt {IN} OSS context. * * NOTES * * RETURNS * */#ifdef __STDC__nzerror nztGetCertChain(nzctx *, nzttWallet * );#elsenzerror nztGetCertChain(/*_ nzctx *, nzttWallet _*/);#endif /* __STDC__ *//*----------------------- nztCompareDN -----------------------*//* * NAME * nztCompareDN - * * PARAMETERS * Name {IN/OUT} Description * osscntxt {IN} OSS context. * dn1 {IN} distinguished name 1 * dn2 {IN} distinguished name 2 * * NOTES * * RETURNS * NZERROR_OK succeeded * others failed * */#ifdef __STDC__nzerror nztCompareDN(nzctx *, ub1 *, ub4, ub1 *, ub4, boolean * );#elsenzerror nztCompareDN(/*_ nzctx *, ub1 *,ub4 , ub1 *, ub4, boolean * _*/);#endif/* __STDC__ */#ifdef NZ_OLD_TOOLS/*--------------------- nztIdentityAlloc ---------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -