Class PassPhrase
java.lang.Object
|
+--PassPhrase
- public class PassPhrase
- extends java.lang.Object
This program will "one time pad" a file(keyfile) with a string
wich will make it safer to have the keyfile on your disk.
- Version:
- 1.2.2
LAST EDITED: 20.03.2001 <- little endian,
- Author:
- Erlend Aakre, www.klogd.net
Inner Class Summary |
class |
PassPhrase.PassPhraseToFileThread
This inner class can be used by programs wich wants a
progessbars, or wants to run the process as a thread
The Thread version must be used like this:
PassPhrase outerClass = new PassPhrase();
PassPhrase.PassPhraseToFileThread passPhraser = null;
passPhraser = outerClass. |
Method Summary |
static void |
main(java.lang.String[] args)
|
static int[] |
toArray(java.lang.String passPhrase,
int[] data)
This method will pad a integer array (representing bytes?)
the result of this will be a new int array |
static void |
toFile(java.lang.String passPhrase,
java.io.File keyFile)
This method will pad a keyfile with a passphrase
the keyfile will be overwritten by the new passphrased key |
static void |
toNewFile(java.lang.String passPhrase,
java.io.File keyFile,
java.io.File newFile)
This method will pad a keyfile with a passphrase
the result of this will be put in a new file |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PassPhrase
public PassPhrase()
main
public static void main(java.lang.String[] args)
toFile
public static void toFile(java.lang.String passPhrase,
java.io.File keyFile)
throws java.io.FileNotFoundException,
java.io.IOException
- This method will pad a keyfile with a passphrase
the keyfile will be overwritten by the new passphrased key
- Parameters:
passPhrase
- the passphrase to pad the file withkeyFile
- the keyfile to passphrase- Throws:
java.io.FileNotFoundException
- if the keyfile is not foundjava.io.IOException
- if there is a problem with file IO
toNewFile
public static void toNewFile(java.lang.String passPhrase,
java.io.File keyFile,
java.io.File newFile)
throws java.io.FileNotFoundException,
java.io.IOException
- This method will pad a keyfile with a passphrase
the result of this will be put in a new file
- Parameters:
passPhrase
- the passphrase to pad the file withkeyFile
- the keyfile to passphrasenewFile
- the file the passphrased keyfile goes to- Throws:
java.io.FileNotFoundException
- if the keyfile is not foundjava.io.IOException
- if there is a problem with file IO
toArray
public static int[] toArray(java.lang.String passPhrase,
int[] data)
- This method will pad a integer array (representing bytes?)
the result of this will be a new int array
- Parameters:
passPhrase
- the passphrase to pad the file withdata
- the array with the stuff to passphrase