*
* @param args not used
*/
public static void main(String[] args)
{
CryptographicProvider p = new GPGCryptographicProvider();
GPGKey myKey = new GPGKey("BF384020FD7BAC6AE98F1111F2CF16F2324033FF");
GPGKey dannyKey = new GPGKey("82D4BE5C00DC9AFBCFA8469110A452249A209C50");
System.out.println("Trust my key: " + p.isTrustedKey(myKey));
System.out.println("Trust d's key: " + p.isTrustedKey(dannyKey));
byte[] e_bytes = p.encryptAndSign("Hallo".getBytes(),myKey,null);
String encrypted = new String(e_bytes);
System.out.println("Encrypted:\n==========\n\n"+encrypted+"\n");
byte[] d_bytes = p.decrypt(encrypted.getBytes(),null);
String decrypted = new String(d_bytes);
System.out.println("Decrypted:\n==========\n\n"+decrypted+"\n\n");
}