Fix text issue during hash calculation.
This commit is contained in:
parent
2d4609e9e8
commit
eae105ab61
|
@ -73,7 +73,7 @@ public class Util
|
||||||
}
|
}
|
||||||
ret.totalDigest = totalDigest.digest();
|
ret.totalDigest = totalDigest.digest();
|
||||||
System.out.println("Total hash: " + HexFormat.of().formatHex(ret.totalDigest));
|
System.out.println("Total hash: " + HexFormat.of().formatHex(ret.totalDigest));
|
||||||
long pieceCount = file.length() / pieceSize;
|
long pieceCount = Math.ceilDiv(file.length() , pieceSize);
|
||||||
System.out.println("Have " + ret.pieces.cardinality() + " of " + pieceCount + " pieces.");
|
System.out.println("Have " + ret.pieces.cardinality() + " of " + pieceCount + " pieces.");
|
||||||
return ret;
|
return ret;
|
||||||
} catch (NoSuchAlgorithmException | IOException e)
|
} catch (NoSuchAlgorithmException | IOException e)
|
||||||
|
|
Loading…
Reference in a new issue