library/src/utility/BP-StringUtilities.cc
// Buffer must be at least 40 bytes long
Buffer must be at least 40 bytes long
Buffer must be at least 40 bytes long
BP_ERROR_T BP_GenRandomUUID_StoreInBuff(char *buff)
{
	if(!buff)
		return ERR_FAILURE;
	char * new_uuid = BP_GenRandomUUID();
	if(!new_uuid)
		return ERR_FAILURE;
	memcpy(buff, new_uuid, bpstrlen(new_uuid));
	bpfree(new_uuid);
	return ERR_SUCCESS;
}
BP_ERROR_T BP_GenRandomUUID_StoreInBuff ( char * buff ) { if ( ! buff ) return ERR_FAILURE ; char * new_uuid = BP_GenRandomUUID ( ) ; if ( ! new_uuid ) return ERR_FAILURE ; memcpy ( buff , new_uuid , bpstrlen ( new_uuid ) ) ; bpfree ( new_uuid ) ; return ERR_SUCCESS ; }
Buffer must be at least 40 bytes long
Buffer must be at least 40 bytes long
// attempt to create a new uuid // copy in data // destroy the uuid // return indicating success