Consider adding a doc comment for computeOnEncryptedData
19 return homomorphicEncryption.decrypt(encryptedData);
20 }
21
22 public byte[] computeOnEncryptedData(byte[] encryptedData1, byte[] encryptedData2) {23 return secureMultiPartyComputation.compute(encryptedData1, encryptedData2);24 }25}
Consider adding a doc comment for decryptData
15 return homomorphicEncryption.encrypt(data);
16 }
17
18 public byte[] decryptData(byte[] encryptedData) {19 return homomorphicEncryption.decrypt(encryptedData);20 }21
22 public byte[] computeOnEncryptedData(byte[] encryptedData1, byte[] encryptedData2) {
23 return secureMultiPartyComputation.compute(encryptedData1, encryptedData2);
Consider adding a doc comment for encryptData
11 secureMultiPartyComputation = new SecureMultiPartyComputation();
12 }
13
14 public byte[] encryptData(byte[] data) {15 return homomorphicEncryption.encrypt(data);16 }17
18 public byte[] decryptData(byte[] encryptedData) {
19 return homomorphicEncryption.decrypt(encryptedData);
Description
This method does not have any documentation.
Consider adding a documentation comment to explain its use.
While it may seem like the usage of a method is perfectly obvious, any consumers of your API may not be able to pick up on certain details.
Bad Practice
This method appears to return an address string based on its name and the return type, but it is hard to say anything further about it. We neither know if the address will be formatted in a special way nor are we given any useful information regarding the returned value.
String getAddress() {
// ...
}
Recommended
Provide a detailed description of what the method does.
/**
* Returns the address in 3 line format,
* with street address on line 1, area/city on line 2
* and state and country as well as postal code on line 3.
*/
String getAddress() {
// ...
}