|
|
@ -13,7 +13,7 @@ class InterfaceServeur(Interface): |
|
|
|
# à compléter |
|
|
|
self.waitForHelloButton = tk.Button(self, text="Serveur Hello", command=self.hello) |
|
|
|
self.waitForHelloButton.pack() |
|
|
|
self.finishedButton = tk.Button(self, text="Finished", command=self.finish) |
|
|
|
self.finishedButton = tk.Button(self, text="Finished", command=self.finish, state="disabled") |
|
|
|
self.finishedButton.pack() |
|
|
|
|
|
|
|
def hello(self): |
|
|
@ -23,6 +23,8 @@ class InterfaceServeur(Interface): |
|
|
|
if self.message.get() == "HELLO": |
|
|
|
self.entree.set(str(self.e)+";"+str(self.n)) |
|
|
|
self.send() |
|
|
|
self.waitForHelloButton['state'] = 'disabled' |
|
|
|
self.finishedButton['state'] = 'enabled' |
|
|
|
else: |
|
|
|
print("HELLO n'a pas été reçu.") |
|
|
|
|
|
|
@ -35,6 +37,9 @@ class InterfaceServeur(Interface): |
|
|
|
self.set_cleSymetrique(cleSym_dechiffree) |
|
|
|
self.entree.set("Finished") |
|
|
|
self.send() |
|
|
|
self.finishedButton['state'] = "disabled" |
|
|
|
self.sendButton['state'] = "enabled" |
|
|
|
self.recvButton['state'] = "enabled" |
|
|
|
|
|
|
|
def dechiffre_RSA(self, msg): |
|
|
|
"""déchiffre un message avec sa clé privée""" |
|
|
|