public static void FriendsAddTest() { ClientProcessing cp = new ClientProcessing(); int id = cp.AddActiveUser(); int id1 = cp.AddActiveUser(); Console.WriteLine(cp.Login("Username:test1$$Password:test1234$$", id)); Console.WriteLine(cp.Login("Username:test2$$Password:test1234$$", id1)); string pk = BigInteger.Parse("1572974685565517564760848834612061204603051782958757453266089894").ToString("X"); string pri = BigInteger.Parse("2171516053468561523083790486470955343976023523132159054917711086").ToString("X"); string iv = BigInteger.Parse("48040271114089576525052332491161").ToString("X"); Console.WriteLine(cp.AddFriend("SecondUserName:test2$$", id)); Console.WriteLine(cp.DhExchange(String.Format("InvitationID:1$$PK:{0}$$PrivateK:{1}$$IV:{2}$$", pk, pri, iv), id)); Console.WriteLine(cp.SendInvitations("", id1)); Console.WriteLine(cp.AcceptFriend("InvitationID:1$$PKB:4$$", id1)); Console.WriteLine(cp.SendConversationKey("ConversationID:1$$ConversationKey:ytyt$$", id1)); Console.WriteLine(cp.SendAcceptedFriends("", id)); Console.WriteLine(cp.SendConversationKey("ConversationID:1$$ConversationKey:ytyoit$$", id)); }
public static string SendInvitations(int clientId, ClientProcessing cp) { return(cp.SendInvitations(clientId, "test1")); }