Minor cleanup and refactoring.

This commit is contained in:
Marko Zivanovic
2014-11-30 21:12:55 +01:00
parent 5eea98d115
commit db9390d11c
2 changed files with 2 additions and 5 deletions
@@ -49,7 +49,7 @@ public final class SasUtils {
public static BigInteger encodeStringToInteger(String str) {
byte[] bytes = str.getBytes(StandardCharsets.UTF_8);
byte[] res;
if ((bytes[0] & 0b10000000) >> 7 == 1) {
if ((bytes[0] & 0b1000_0000) >> 7 == 1) {
res = new byte[bytes.length + 1];
res[0] = 0;
System.arraycopy(bytes, 0, res, 1, bytes.length);
@@ -84,10 +84,7 @@ public final class SecretShare {
if (!Objects.equals(this.share, other.share)) {
return false;
}
if (!Objects.equals(this.prime, other.prime)) {
return false;
}
return true;
return Objects.equals(this.prime, other.prime);
}
@Override