XilinxProcessorIPLib/drivers/hdcp22_common/src/sha2.c
static void Sha256Update(Sha256Type *Ctx, const u8 *Data, u32 Len)
{
   volatile u32 i;

   for (i=0; i < Len; ++i) {
      Ctx->data[Ctx->datalen] = Data[i];
      Ctx->datalen++;
      if (Ctx->datalen == 64) {
	  Sha256Transform(Ctx,Ctx->data);
         DBL_INT_ADD(Ctx->bitlen[0],Ctx->bitlen[1],512);
         Ctx->datalen = 0;
      }
   }
}
/*****************************************************************************/
/**
*
* This function updates the SHA data before adding padding data.
*
* @param  Ctx is the context data for SHA256.
* @param  Data is the input data.
* @param  Len is size of the input data array.
*
* @return None.
*
* @note   None.
*
******************************************************************************/
This function updates the SHA data before adding padding data.
This function updates the SHA data before adding padding data .
static void Sha256Update(Sha256Type *Ctx, const u8 *Data, u32 Len)
{
   volatile u32 i;
   for (i=0; i < Len; ++i) {
      Ctx->data[Ctx->datalen] = Data[i];
      Ctx->datalen++;
      if (Ctx->datalen == 64) {
	  Sha256Transform(Ctx,Ctx->data);
         DBL_INT_ADD(Ctx->bitlen[0],Ctx->bitlen[1],512);
         Ctx->datalen = 0;
      }
   }
}
static void Sha256Update ( Sha256Type * Ctx , const u8 * Data , u32 Len ) { volatile u32 i ; for ( i = 0 ; i < Len ; ++ i ) { Ctx -> data [ Ctx -> datalen ] = Data [ i ] ; Ctx -> datalen ++ ; if ( Ctx -> datalen == 64 ) { Sha256Transform ( Ctx , Ctx -> data ) ; DBL_INT_ADD ( Ctx -> bitlen [ 0 ] , Ctx -> bitlen [ 1 ] , 512 ) ; Ctx -> datalen = 0 ; } } }
This function updates the SHA data before adding padding data.
This function updates the SHA data before adding padding data .