diff --git a/src/org/blueshard/cryptogx/SecureDelete.java b/src/org/blueshard/cryptogx/SecureDelete.java deleted file mode 100644 index 0d1ee05..0000000 --- a/src/org/blueshard/cryptogx/SecureDelete.java +++ /dev/null @@ -1,90 +0,0 @@ -package org.bytedream.cryptogx; - -import java.io.*; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; -import java.util.Random; -import java.util.TreeSet; - -/** - *
Class for secure delete files
- * - * @since 1.2.0 - */ -public class SecureDelete { - - public static void deleteDirectory(String directory, int iterations, byte[] buffer) throws IOException { - TreeSetOverwrites the file {@param iterations} times line by line with random bytes (minimal size {@param minFileSize}; maximal size {@param maxFileSize}) and delete it
- * - * @param file that should be deleted - * @param iterations how many times the file should be overwritten before it gets deleted - * @return if the file could be deleted - * @throws IOException - * - * @since 1.12.0 - */ - public static void deleteFile(File file, int iterations, byte[] buffer) throws IOException { - SecureRandom secureRandom = new SecureRandom(); - RandomAccessFile raf = new RandomAccessFile(file, "rws"); - for (int i=0; i