fix digest name

pull/4/head
Zlatin Balevsky 2018-07-17 22:30:58 +01:00
parent 0190db2046
commit 8e464604f4
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ public class InfoHash {
public static InfoHash fromHashList(byte []hashList) { public static InfoHash fromHashList(byte []hashList) {
try { try {
MessageDigest sha256 = MessageDigest.getInstance("SHA256"); MessageDigest sha256 = MessageDigest.getInstance("SHA-256");
byte[] root = sha256.digest(hashList); byte[] root = sha256.digest(hashList);
return new InfoHash(root, hashList); return new InfoHash(root, hashList);
} catch (NoSuchAlgorithmException impossible) { } catch (NoSuchAlgorithmException impossible) {