From 502a8d91da809a98cbbb94fb98c078bcfc8ab3b7 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Sat, 8 Jun 2019 09:30:01 +0100 Subject: [PATCH] print only the root --- core/src/main/groovy/com/muwire/core/files/FileHasher.groovy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/groovy/com/muwire/core/files/FileHasher.groovy b/core/src/main/groovy/com/muwire/core/files/FileHasher.groovy index 963aabe7..51a2d704 100644 --- a/core/src/main/groovy/com/muwire/core/files/FileHasher.groovy +++ b/core/src/main/groovy/com/muwire/core/files/FileHasher.groovy @@ -1,6 +1,9 @@ package com.muwire.core.files import com.muwire.core.InfoHash + +import net.i2p.data.Base64 + import java.nio.MappedByteBuffer import java.nio.channels.FileChannel import java.nio.channels.FileChannel.MapMode @@ -79,6 +82,6 @@ class FileHasher { file = file.getAbsoluteFile() def hasher = new FileHasher() def infohash = hasher.hashFile(file) - println infohash + println Base64.encode(infohash.getRoot()) } }