XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x_tx.c
static u64 XHdcp1x_TxGenerateAn(XHdcp1x *InstancePtr)
{
	u64 An = 0;

	/* Attempt to generate An */
	if (XHdcp1x_CipherDoRequest(InstancePtr,
		XHDCP1X_CIPHER_REQUEST_RNG) == XST_SUCCESS) {
		/* Wait until done */
		while (!XHdcp1x_CipherIsRequestComplete(InstancePtr));

		/* Update theAn */
		An = XHdcp1x_CipherGetMi(InstancePtr);
	}

	/* Check if zero */
	if (An == 0) {
		An = 0x351F7175406A74Dull;
	}

	return (An);
}
/*****************************************************************************/
/**
* This function generates the An from a random number generator.
*
* @param	InstancePtr is the HDCP state machine.
*
* @return	A 64-bit pseudo random number (An).
*
* @note		None.
*
******************************************************************************/
This function generates the An from a random number generator.
This function generates the An from a random number generator .
static u64 XHdcp1x_TxGenerateAn(XHdcp1x *InstancePtr)
{
	u64 An = 0;
	if (XHdcp1x_CipherDoRequest(InstancePtr,
		XHDCP1X_CIPHER_REQUEST_RNG) == XST_SUCCESS) {
		while (!XHdcp1x_CipherIsRequestComplete(InstancePtr));
		An = XHdcp1x_CipherGetMi(InstancePtr);
	}
	if (An == 0) {
		An = 0x351F7175406A74Dull;
	}
	return (An);
}
static u64 XHdcp1x_TxGenerateAn ( XHdcp1x * InstancePtr ) { u64 An = 0 ; if ( XHdcp1x_CipherDoRequest ( InstancePtr , XHDCP1X_CIPHER_REQUEST_RNG ) == XST_SUCCESS ) { while ( ! XHdcp1x_CipherIsRequestComplete ( InstancePtr ) ) ; An = XHdcp1x_CipherGetMi ( InstancePtr ) ; } if ( An == 0 ) { An = 0x351F7175406A74Dull ; } return ( An ) ; }
This function generates the An from a random number generator.
This function generates the An from a random number generator .
/* Attempt to generate An */ /* Wait until done */ /* Update theAn */ /* Check if zero */