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

	if ((KeyStr == NULL) ||
		(Dst == NULL) ||
		(Len != XNVM_EFUSE_AES_KEY_LEN_IN_BITS)) {
		goto END;
	}
	Status = XNvm_ValidateAesKey(KeyStr);
	if(Status != XST_SUCCESS) {
		goto END;
	}
	Status = Xil_ConvertStringToHexLE(KeyStr, Dst, Len);

END:
	return Status;
}
/****************************************************************************/
/**
 * This function is to validate and convert Aes key string to Hex
 *
 * @param	KeyStr	Pointer to Aes Key String
 *
 * @param	Dst	Destination where converted Aes key can be stored
 *
 * @param	Len 	Length of the Aes key in bits
 *
 * @return
 *		- XST_SUCCESS - If validation and conversion of key is success
 *		- Error Code - On Failure.
 *
 ******************************************************************************/
This function is to validate and convert Aes key string to Hex
@param       KeyStr  Pointer to Aes Key String

@param       Dst     Destination where converted Aes key can be stored

@param       Len     Length of the Aes key in bits

@return
- XST_SUCCESS - If validation and conversion of key is success
- Error Code - On Failure.
This function is to validate and convert Aes key string to Hex @param KeyStr Pointer to Aes Key String @param Dst Destination where converted Aes key can be stored @param Len Length of the Aes key in bits @return - XST_SUCCESS - If validation and conversion of key is success - Error Code - On Failure .
static int XilNvm_PrepareAesKeyForWrite(const char *KeyStr, u8 *Dst, u32 Len)
{
	int Status = XST_FAILURE;
	if ((KeyStr == NULL) ||
		(Dst == NULL) ||
		(Len != XNVM_EFUSE_AES_KEY_LEN_IN_BITS)) {
		goto END;
	}
	Status = XNvm_ValidateAesKey(KeyStr);
	if(Status != XST_SUCCESS) {
		goto END;
	}
	Status = Xil_ConvertStringToHexLE(KeyStr, Dst, Len);
END:
	return Status;
}
static int XilNvm_PrepareAesKeyForWrite ( const char * KeyStr , u8 * Dst , u32 Len ) { int Status = XST_FAILURE ; if ( ( KeyStr == NULL ) || ( Dst == NULL ) || ( Len != XNVM_EFUSE_AES_KEY_LEN_IN_BITS ) ) { goto END ; } Status = XNvm_ValidateAesKey ( KeyStr ) ; if ( Status != XST_SUCCESS ) { goto END ; } Status = Xil_ConvertStringToHexLE ( KeyStr , Dst , Len ) ; END : return Status ; }
This function is to validate and convert Aes key string to Hex
 @param       KeyStr  Pointer to Aes Key String
This function is to validate and convert Aes key string to Hex @param KeyStr Pointer to Aes Key String