lib/sw_services/xilnvm/examples/xilnvm_efuse_versal_client_example.c
static int XilNvm_PrepareIvForWrite(const char *IvStr, u8 *Dst, u32 Len)
{
	int Status = XST_FAILURE;

	if ((IvStr == NULL) ||
		(Dst == NULL) ||
		(Len != XNVM_EFUSE_IV_LEN_IN_BITS)) {
		goto END;
	}

	Status = XilNvm_ValidateIvString(IvStr);
	if(Status != XST_SUCCESS) {
		xil_printf("IV string validation failed\r\n");
		goto END;
	}
	Status = Xil_ConvertStringToHexBE(IvStr, Dst, Len);

END:
	return Status;
}
/****************************************************************************/
/**
 * This function is to validate and convert IV string to Hex
 *
 * @param	IvStr	Pointer to IV String
 *
 * @param 	Dst	Destination to store the converted IV in Hex
 *
 * @param	Len	Length of the IV in bits
 *
 * @return
 *		- XST_SUCCESS - If validation and conversion of IV success
 *		- Error Code - On Failure.
 *
 ******************************************************************************/
This function is to validate and convert IV string to Hex
@param       IvStr   Pointer to IV String

@param       Dst     Destination to store the converted IV in Hex

@param       Len     Length of the IV in bits

@return
- XST_SUCCESS - If validation and conversion of IV success
- Error Code - On Failure.
This function is to validate and convert IV string to Hex @param IvStr Pointer to IV String @param Dst Destination to store the converted IV in Hex @param Len Length of the IV in bits @return - XST_SUCCESS - If validation and conversion of IV success - Error Code - On Failure .
static int XilNvm_PrepareIvForWrite(const char *IvStr, u8 *Dst, u32 Len)
{
	int Status = XST_FAILURE;
	if ((IvStr == NULL) ||
		(Dst == NULL) ||
		(Len != XNVM_EFUSE_IV_LEN_IN_BITS)) {
		goto END;
	}
	Status = XilNvm_ValidateIvString(IvStr);
	if(Status != XST_SUCCESS) {
		xil_printf("IV string validation failed\r\n");
		goto END;
	}
	Status = Xil_ConvertStringToHexBE(IvStr, Dst, Len);
END:
	return Status;
}
static int XilNvm_PrepareIvForWrite ( const char * IvStr , u8 * Dst , u32 Len ) { int Status = XST_FAILURE ; if ( ( IvStr == NULL ) || ( Dst == NULL ) || ( Len != XNVM_EFUSE_IV_LEN_IN_BITS ) ) { goto END ; } Status = XilNvm_ValidateIvString ( IvStr ) ; if ( Status != XST_SUCCESS ) { xil_printf ( " \r \n " ) ; goto END ; } Status = Xil_ConvertStringToHexBE ( IvStr , Dst , Len ) ; END : return Status ; }
This function is to validate and convert IV string to Hex
 @param       IvStr   Pointer to IV String
This function is to validate and convert IV string to Hex @param IvStr Pointer to IV String