core.crypto
Class Wipe

java.lang.Object
  extended by core.crypto.Wipe

public class Wipe
extends Object

This class is used to clear confidential data structures from memory I'm not sure if this is necessary, but it won't hurt. Since we are usually operating on volatile memeory I think two loops are enough. We don't want to waste too much performance.

  Copyright (c) 2006 Sebastian Erdweg
  Copyright (c) 2006 Dominik Schulz
  Copyright (c) 2006 Florian Lindner
  Copyright (c) 2006 Betim Berjani
  
  This file is part of FlexiCrypt.

  FlexiCrypt is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  FlexiCrypt is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  
  You should have received a copy of the GNU General Public License
  along with FlexiCrypt; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  

Author:
Dominik

Constructor Summary
Wipe()
           
 
Method Summary
static void wipe(byte[] byteArray)
          two way overwrite of the byte array
static boolean wipe(File file)
           
static boolean wipe(File file, int iterations)
          Secure deletion of a file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Wipe

public Wipe()
Method Detail

wipe

public static void wipe(byte[] byteArray)
two way overwrite of the byte array

Parameters:
byteArray -

wipe

public static boolean wipe(File file)
                    throws IOException
Throws:
IOException

wipe

public static boolean wipe(File file,
                           int iterations)
                    throws IOException
Secure deletion of a file

Parameters:
file -
iterations -
Returns:
success of operation
Throws:
IOException