Open anttijuu opened 4 years ago
Methods should be requested from the server (handleCapabilityRequest), and then client should -- when the response arrives -- keep the available methods in a member variable. Then, when user wants to encrypt or decrypt, these stored methods may be printed out to help user remember which methods are available. Obviously if client retrieves the capability methods again, the new ones returned from the server should be kept instead. Thus any additions to methods in server side are refreshed to the client side.
It is also possible to prevent user entering any cryptomethod that is not actually supported by the server.
https://github.com/mbuet2ner/JEasyCrypto/blob/d849706711a9ed22189deaf0cb373970ea326697/JEasyCryptoClient/src/CryptoClient.java#L159
The methods should be requested from the server always.