moved hash-related stuff core.digest package. Renamed XorSeaHash to BalticHash :).
This commit is contained in:
parent
2f96f7728e
commit
d871fc14cb
@ -19,7 +19,7 @@
|
||||
package net.szum123321.textile_backup;
|
||||
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.szum123321.textile_backup.core.Hash;
|
||||
import net.szum123321.textile_backup.core.digest.Hash;
|
||||
import net.szum123321.textile_backup.core.Utilities;
|
||||
import net.szum123321.textile_backup.core.XorSeaHash;
|
||||
import net.szum123321.textile_backup.core.create.MakeBackupRunnable;
|
||||
|
@ -20,7 +20,8 @@ package net.szum123321.textile_backup.core.create;
|
||||
|
||||
import net.szum123321.textile_backup.TextileBackup;
|
||||
import net.szum123321.textile_backup.TextileLogger;
|
||||
import net.szum123321.textile_backup.core.FileTreeHashBuilder;
|
||||
import net.szum123321.textile_backup.core.digest.FileTreeHashBuilder;
|
||||
import net.szum123321.textile_backup.core.digest.HashingInputStream;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -26,6 +26,7 @@ import net.szum123321.textile_backup.core.create.BackupContext;
|
||||
import net.szum123321.textile_backup.core.create.BrokenFileHandler;
|
||||
import net.szum123321.textile_backup.core.create.FileInputStreamSupplier;
|
||||
import net.szum123321.textile_backup.core.create.InputSupplier;
|
||||
import net.szum123321.textile_backup.core.digest.FileTreeHashBuilder;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.file.Files;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.szum123321.textile_backup.core;
|
||||
package net.szum123321.textile_backup.core.digest;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.szum123321.textile_backup.core;
|
||||
package net.szum123321.textile_backup.core.digest;
|
||||
|
||||
import net.szum123321.textile_backup.Globals;
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.szum123321.textile_backup.core;
|
||||
package net.szum123321.textile_backup.core.digest;
|
||||
|
||||
public interface Hash {
|
||||
void update(byte b);
|
@ -16,19 +16,18 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.szum123321.textile_backup.core.create;
|
||||
package net.szum123321.textile_backup.core.digest;
|
||||
|
||||
import net.szum123321.textile_backup.Globals;
|
||||
import net.szum123321.textile_backup.core.DataLeftException;
|
||||
import net.szum123321.textile_backup.core.FileTreeHashBuilder;
|
||||
import net.szum123321.textile_backup.core.Hash;
|
||||
import net.szum123321.textile_backup.core.create.BrokenFileHandler;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.file.Path;
|
||||
|
||||
//This class calculates a hash of the file on the input stream, submits it to FileTreeHashBuilder.
|
||||
//In case the whole underlying stream hasn't been read, also puts it into BrokeFileHandler
|
||||
//In case the underlying stream hasn't been read completely in, puts it into BrokeFileHandler
|
||||
public class HashingInputStream extends FilterInputStream {
|
||||
private final Path path;
|
||||
private final Hash hasher = Globals.CHECKSUM_SUPPLIER.get();
|
||||
|
@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.szum123321.textile_backup.core.restore;
|
||||
package net.szum123321.textile_backup.core.digest;
|
||||
|
||||
import net.szum123321.textile_backup.Globals;
|
||||
import net.szum123321.textile_backup.core.FileTreeHashBuilder;
|
||||
|
@ -20,9 +20,9 @@ package net.szum123321.textile_backup.core.restore.decompressors;
|
||||
|
||||
import net.szum123321.textile_backup.TextileBackup;
|
||||
import net.szum123321.textile_backup.TextileLogger;
|
||||
import net.szum123321.textile_backup.core.FileTreeHashBuilder;
|
||||
import net.szum123321.textile_backup.core.digest.FileTreeHashBuilder;
|
||||
import net.szum123321.textile_backup.core.Utilities;
|
||||
import net.szum123321.textile_backup.core.restore.HashingOutputStream;
|
||||
import net.szum123321.textile_backup.core.digest.HashingOutputStream;
|
||||
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
|
||||
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
|
||||
import org.apache.commons.compress.compressors.CompressorException;
|
||||
|
@ -20,9 +20,9 @@ package net.szum123321.textile_backup.core.restore.decompressors;
|
||||
|
||||
import net.szum123321.textile_backup.TextileBackup;
|
||||
import net.szum123321.textile_backup.TextileLogger;
|
||||
import net.szum123321.textile_backup.core.FileTreeHashBuilder;
|
||||
import net.szum123321.textile_backup.core.digest.FileTreeHashBuilder;
|
||||
import net.szum123321.textile_backup.core.Utilities;
|
||||
import net.szum123321.textile_backup.core.restore.HashingOutputStream;
|
||||
import net.szum123321.textile_backup.core.digest.HashingOutputStream;
|
||||
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
|
||||
import org.apache.commons.compress.archivers.zip.ZipFile;
|
||||
import org.apache.commons.compress.utils.IOUtils;
|
||||
|
Loading…
Reference in New Issue
Block a user