Components
Class Crypt

java.lang.Object
  extended by Components.Crypt

public class Crypt
extends java.lang.Object

Cryptographic component


Field Summary
private  de.tubs.cs.iti.krypto.chiffre.Cipher c
          Cipher to use
 
Constructor Summary
Crypt(java.lang.String cName)
          Default constructor
 
Method Summary
 void breakCipher(java.lang.String cleartxt, java.lang.String ciphertxt, java.lang.String key, int mod)
          Break the encryption of an encrypted file
 void createKey(java.lang.String file)
          Generates a new key (interactive command)
 void decrypt(java.lang.String cleartxt, java.lang.String ciphertxt, java.lang.String key)
          Decrypt a file
 void encrypt(java.lang.String cleartxt, java.lang.String ciphertxt, java.lang.String key)
          Encrypt a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

c

private de.tubs.cs.iti.krypto.chiffre.Cipher c
Cipher to use

Constructor Detail

Crypt

public Crypt(java.lang.String cName)
      throws java.lang.ClassNotFoundException,
             java.lang.InstantiationException,
             java.lang.IllegalAccessException
Default constructor

Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
Method Detail

createKey

public void createKey(java.lang.String file)
               throws java.io.IOException
Generates a new key (interactive command)

Parameters:
file - Key file
Throws:
java.io.IOException

encrypt

public void encrypt(java.lang.String cleartxt,
                    java.lang.String ciphertxt,
                    java.lang.String key)
             throws java.io.IOException
Encrypt a file

Parameters:
cleartxt - Cleartext file
ciphertxt - Ciphertext file
key - Key file
Throws:
java.io.IOException

decrypt

public void decrypt(java.lang.String cleartxt,
                    java.lang.String ciphertxt,
                    java.lang.String key)
             throws java.io.IOException
Decrypt a file

Parameters:
cleartxt - Cleartext file
ciphertxt - Ciphertext file
key - Key file
Throws:
java.io.IOException

breakCipher

public void breakCipher(java.lang.String cleartxt,
                        java.lang.String ciphertxt,
                        java.lang.String key,
                        int mod)
                 throws java.io.IOException
Break the encryption of an encrypted file

Parameters:
cleartxt - Cleartext file
ciphertxt - Ciphertext file
key - Key file
mod - Modulus
Throws:
java.io.IOException