jaugment2.texteditor
Class CryptixCrypter

java.lang.Object
  |
  +--jaugment2.texteditor.CryptixCrypter

public class CryptixCrypter
extends java.lang.Object
implements TextEditorCrypter

encryption-signing-engine for the Text-Editor-Service (and others using this interface) using Cryptix for GPG/PGP-compactible encryption only.


Field Summary
private  TextEditorCrypter next
           
private  TextEditorProxy proxy
           
 
Constructor Summary
CryptixCrypter(TextEditorCrypter next, TextEditorProxy proxy)
           
 
Method Summary
 boolean checksignGPG(byte[] data)
          Check the GPG-signature on data
 void decryptGPG(java.lang.Object buffername, byte[] in, byte[] pwd)
          Decrypt the given bytes representing a conventional encrypted pgp-packet with the given key a new buffer with the given name
 byte[] encryptGPG(byte[] msg, java.lang.String keyname, boolean amor)
          Encrypt the content of the given buffer with the given key PGP-compactible.
 byte[] encryptGPG(java.lang.Object buffer, byte[] pwd)
          Encrypt the content of the given buffer with the given key PGP-compactible
 java.lang.String[] getGPGKeyNames(boolean onlysecretkeys)
          Get the names of all GPG-keys
 byte[] signGPG(byte[] msg, byte[] pwd, java.lang.String keyname, boolean clearsign)
          Sign the content of the given buffer with the given key PGP-compactible.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

next

private TextEditorCrypter next

proxy

private TextEditorProxy proxy
Constructor Detail

CryptixCrypter

public CryptixCrypter(TextEditorCrypter next,
                      TextEditorProxy proxy)
Parameters:
next - = a next TextEditorCrypter that should be tried if we fail
proxy - a TextEditorProxy for the decrypt-method to add a buffer with the drcrypted text on
Method Detail

encryptGPG

public byte[] encryptGPG(java.lang.Object buffer,
                         byte[] pwd)
Encrypt the content of the given buffer with the given key PGP-compactible
Specified by:
encryptGPG in interface TextEditorCrypter

encryptGPG

public byte[] encryptGPG(byte[] msg,
                         java.lang.String keyname,
                         boolean amor)
Encrypt the content of the given buffer with the given key PGP-compactible. This function may not throw any exceptions but return null.
Specified by:
encryptGPG in interface TextEditorCrypter

decryptGPG

public void decryptGPG(java.lang.Object buffername,
                       byte[] in,
                       byte[] pwd)
                throws java.lang.Exception
Decrypt the given bytes representing a conventional encrypted pgp-packet with the given key a new buffer with the given name
Specified by:
decryptGPG in interface TextEditorCrypter

checksignGPG

public boolean checksignGPG(byte[] data)
                     throws java.lang.Exception
Check the GPG-signature on data
Specified by:
checksignGPG in interface TextEditorCrypter

signGPG

public byte[] signGPG(byte[] msg,
                      byte[] pwd,
                      java.lang.String keyname,
                      boolean clearsign)
               throws java.lang.Exception
Sign the content of the given buffer with the given key PGP-compactible. Returns the signed message with signature and amor
Specified by:
signGPG in interface TextEditorCrypter

getGPGKeyNames

public java.lang.String[] getGPGKeyNames(boolean onlysecretkeys)
                                  throws java.lang.Exception
Get the names of all GPG-keys
Specified by:
getGPGKeyNames in interface TextEditorCrypter