src/LLC/hash/SK/skein.cpp
int Skein_256_Final_Pad(Skein_256_Ctxt_t *ctx, u08b_t *hashVal)
{
    Skein_Assert(ctx->h.bCnt <= SKEIN_256_BLOCK_BYTES,SKEIN_FAIL);    /* catch uninitialized context */

    ctx->h.T[1] |= SKEIN_T1_FLAG_FINAL;        /* tag as the final block */
    if(ctx->h.bCnt < SKEIN_256_BLOCK_BYTES)   /* zero pad b[] if necessary */
        memset(&ctx->b[ctx->h.bCnt],0,SKEIN_256_BLOCK_BYTES - ctx->h.bCnt);
    Skein_256_Process_Block(ctx,ctx->b,1,ctx->h.bCnt);    /* process the final block */

    Skein_Put64_LSB_First(hashVal,ctx->X,SKEIN_256_BLOCK_BYTES);   /* "output" the state bytes */

    return SKEIN_SUCCESS;
}
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/* finalize the hash computation and output the block, no OUTPUT stage */
finalize the hash computation and output the block, no OUTPUT stage
finalize the hash computation and output the block no OUTPUT stage
int Skein_256_Final_Pad(Skein_256_Ctxt_t *ctx, u08b_t *hashVal)
{
    Skein_Assert(ctx->h.bCnt <= SKEIN_256_BLOCK_BYTES,SKEIN_FAIL);    
    ctx->h.T[1] |= SKEIN_T1_FLAG_FINAL;        
    if(ctx->h.bCnt < SKEIN_256_BLOCK_BYTES)   
        memset(&ctx->b[ctx->h.bCnt],0,SKEIN_256_BLOCK_BYTES - ctx->h.bCnt);
    Skein_256_Process_Block(ctx,ctx->b,1,ctx->h.bCnt);    
    Skein_Put64_LSB_First(hashVal,ctx->X,SKEIN_256_BLOCK_BYTES);   
    return SKEIN_SUCCESS;
}
int Skein_256_Final_Pad ( Skein_256_Ctxt_t * ctx , u08b_t * hashVal ) { Skein_Assert ( ctx -> h . bCnt <= SKEIN_256_BLOCK_BYTES , SKEIN_FAIL ) ; ctx -> h . T [ 1 ] |= SKEIN_T1_FLAG_FINAL ; if ( ctx -> h . bCnt < SKEIN_256_BLOCK_BYTES ) memset ( & ctx -> b [ ctx -> h . bCnt ] , 0 , SKEIN_256_BLOCK_BYTES - ctx -> h . bCnt ) ; Skein_256_Process_Block ( ctx , ctx -> b , 1 , ctx -> h . bCnt ) ; Skein_Put64_LSB_First ( hashVal , ctx -> X , SKEIN_256_BLOCK_BYTES ) ; return SKEIN_SUCCESS ; }
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
finalize the hash computation and output the block, no OUTPUT stage
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ finalize the hash computation and output the block no OUTPUT stage
/* catch uninitialized context */ /* tag as the final block */ /* zero pad b[] if necessary */ /* process the final block */ /* "output" the state bytes */