public class Tools
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
secureRandom(java.io.File file,
long size)
Creates a new file with secure random bytes.
|
static byte[] |
secureRandom(int size)
Creates an array of secure random bytes
|
static void |
wipe(byte[]... bytes)
Overwrites the array with random data
|
static void |
wipe(byte[] bytes)
Overwrites the array with random data
|
static void |
wipe(char[] chars)
Overwrites the array with random data
|
static boolean |
wipe(java.io.File file)
Overwriting an existing file with random data, overwrites the filename and deletes the file (one pass)
|
static boolean |
wipe(java.io.File file,
int passes)
Overwriting an existing file with random data, overwrites the filename and deletes the file
|
public static final byte[] secureRandom(int size)
public static final boolean secureRandom(java.io.File file, long size)
file
- to be createdsize
- in bytespublic static final void wipe(char[] chars)
public static final void wipe(byte[] bytes)
public static final void wipe(byte[]... bytes)
public static final boolean wipe(java.io.File file)
public static final boolean wipe(java.io.File file, int passes)
passes
- number of wiping passes, usually 1 is just fine