ZetaGrid v1.9

zeta.crypto
Class Encrypter

java.lang.Object
  |
  +--zeta.crypto.Encrypter

public class Encrypter
extends java.lang.Object

Encrypts every communication between the client and the server using a key establishment protocol (half-certified Diffie-Hellman) with keys which have a length of 1024 Bit.


Field Summary
private  Key key
           
private  int KEY_LENGTH
           
 
Constructor Summary
Encrypter(Key key)
           
 
Method Summary
static void bzip2CompressData(java.lang.String inFilename, java.lang.String outFilename)
          Compresses a specified file.
 void encrypt(int randomize, long inLength, java.io.InputStream in, java.io.OutputStream out)
          Encrypts a specified input stream.
 void encrypt(int randomize, java.lang.String inFilename, java.lang.String outFilename)
          Encrypts a specified file.
 java.lang.String encryptURLFile(java.lang.String urlFile)
          Encrypts the file attribute of a URL.
static void main(java.lang.String[] args)
          Simple test program.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

private Key key

KEY_LENGTH

private final int KEY_LENGTH
See Also:
Constant Field Values
Constructor Detail

Encrypter

public Encrypter(Key key)
Parameters:
key - key for the encryption algorithm
Method Detail

encrypt

public void encrypt(int randomize,
                    java.lang.String inFilename,
                    java.lang.String outFilename)
             throws java.io.IOException
Encrypts a specified file. Every transfer of a result uses a key establishment protocol (half-certified Diffie-Hellman) with keys which have a length of 1024 Bit.

Parameters:
randomize - random number for the key establishment protocol
inFilename - name of the file which should be encrypted
outFilename - name of the encrypted file
Throws:
java.io.IOException - if an I/O error occurs.

encrypt

public void encrypt(int randomize,
                    long inLength,
                    java.io.InputStream in,
                    java.io.OutputStream out)
             throws java.io.IOException
Encrypts a specified input stream. Every transfer of a result uses a key establishment protocol (half-certified Diffie-Hellman) with keys which have a length of 1024 Bit.

Parameters:
randomize - random number for the key establishment protocol
inLength - inLength length of the input stream which should be encrypted
in - input stream which should be encrypted
out - output stream for the encrypted data
Throws:
java.io.IOException - if an I/O error occurs.

encryptURLFile

public java.lang.String encryptURLFile(java.lang.String urlFile)
                                throws java.io.IOException
Encrypts the file attribute of a URL. The default encryption algorithmus will be used.

Parameters:
urlFile - file attribute of a URL
Returns:
encrypted file attribute of a URL where the parameters are packed in a new parameter 'param'
Throws:
java.io.IOException - if an I/O error occurs.

bzip2CompressData

public static void bzip2CompressData(java.lang.String inFilename,
                                     java.lang.String outFilename)
                              throws java.io.IOException
Compresses a specified file.

Parameters:
inFilename - name of the file which should be compressed
outFilename - name of the compressed file
Throws:
java.io.IOException - if an I/O error occurs.

main

public static void main(java.lang.String[] args)
Simple test program.


ZetaGrid v1.9

For further technical papers, see ZetaGrid Technical Documentation.
 
Copyright © 2001,2002 Sebastian Wedeniwski. All Rights Reserved.