⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nzt.h

📁 ORACLE访问接口
💻 H
📖 第 1 页 / 共 5 页
字号:
/*--------------------- nztkdc_PKDecrypt ---------------------*/

/*
 * NAME
 *    nztkdc_PKDecrypt - Decrypt a PKEncrypted message.
 * 
 * PARAMETERS
 *    osscntxt    {IN}     OSS context.
 *    persona     {IN}     Persona.
 *    state       {IN}     State of encryption.
 *    inlen       {IN}     Length of this input part.
 *    in          {IN}     This input part.
 *    tdubuf      {IN/OUT} TDU buffer.
 * 
 * NOTES
 *    
 * RETURNS
 *    NZERROR_OK           Success.
 *    NZERROR_TK_CANTGROW  Needed to grow output buffer but could not.
 *    NZERROR_TK_NOTOPEN   Persona is not open.
 *    NZERROR_TK_NOTSUPP   Function not supported with persona.
 */
#ifdef __STDC__
nzerror nztkdc_PKDecrypt(nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
                             nzttBufferBlock *);
#else
nzerror nztkdc_PKDecrypt(/*_ nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
                             nzttBufferBlock * _*/);
#endif /* __STDC __*/

/*-------------------------- nztHash --------------------------*/

/*
 * NAME
 *    nztHash - Generate a hash.
 * 
 * PARAMETERS
 *    osscntxt {IN}     OSS context.
 *    persona  {IN}     Persona.
 *    state    {IN}     State of hash.
 *    inlen    {IN}     Length of this input.
 *    in       {IN}     This input.
 *    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 *);
#else
nzerror 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 *);
#else
nzerror 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 *);
#else
nzerror 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 *);
#else
nzerror 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 *);
#else
nzerror 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 *);
#else
nzerror 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 *);
#else
nzerror 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 *);
#else
nzerror 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 *);
#else
nzerror 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 *);
#else
nzerror 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 *);
#else
nzerror 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 *);
#else
nzerror 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 *);
#else
nzerror 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 *);
#else
nzerror 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__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -