diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..de43ebf
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..bc1e8f3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+*.class
+build/
+dist/
+hs_err_pid*.log
+jni/*.o
+jni/*.orig
+jni/TAGS
+# generated JNI headers
+jni/com_freiheit_gnupg_GnuPG*.h
+lib/libgnupg-for-java.so
+target/
diff --git a/.project b/.project
new file mode 100644
index 0000000..063aec5
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+
+
+ gnupg-for-java
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/README.md b/README.md
index bf6fadb..48747d1 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,71 @@
-About GnuPG for Java
-=======================
+GnuPG for Java
+==============
-This is a lib I wrote a couple of years ago. It is a native binding to the
-gpgme library from Werner Koch. It uses JNI.
+GnuPG for Java is a Java wrapper for the gpgme (GnuPG Made Easy) library for
+working with the GnuPG encryption suite. It is a native binding to the gpgme
+using JNI. It requires gpgme 1.4.3 or newer, and expects to work with GnuPG
+2.x as the "engine" in gpgme. With GnuPG 2.x, gpg-agent will handle prompting
+the user for the passphrase, as well as passphrase caching.
gpgpme is the standard library for developing third-party apps on top of GnuPG.
-I wrote it for 32-Bit Intel GNU/Linux platforms. Some of my colleagues added
-64-Bit Intel GNU/Linux support. It should run on other Unix-platforms, too. But
-this is not tested. Also I am not aware if it runs with the current version
-of gpgme. It should be easy to add Windows support by compiling a DLL, adding
-this to the jar and extend the loading mechanism to load a DLL on a Windows platform
+Stefan Richter originally wrote it for 32-Bit Intel GNU/Linux platforms. Some
+of his colleagues added 64-Bit Intel GNU/Linux support. It should build and
+run on other UNIX platforms too, but that has not been tested. The Guardian
+Project then ported it to GnuPG 2.x and Android as the basis of Gnu Privacy
+Guard for Android, and added lots of features and fixed lots of bugs in the
+process.
+
+It should be easy to add Windows support by compiling a DLL, adding this to
+the jar and extend the loading mechanism to load a DLL on a Windows platform
instead of loading a .so lib.
+## Setup for Building
+
+You will need a JUnit jar to run the tests. If your system does not provide
+one already, you can download the jar and put it into the build/ directory of
+this project.
+
+### Debian/Ubuntu/Mint/etc
+
+ sudo apt-get install default-jdk make ant build-essential \
+ libgpgme11-dev libgpg-error-dev
+
+
+### Windows
+
+* Install MinGW (for 32-bit): http://mingw.org/
+* Install Gpg4win: http://gpg4win.org/download.html
+** Signing Key Fingerprint: `61AC 3F5E E4BE 593C 13D6 8B1E 7CBD 620B EC70 B1B8`
+
+
+### Mac OS X
+
+You need to install GnuPG2 from one of a couple sources. You can get
+it from Homebrew, MacPorts, or Fink. Or you can install
+"GPGTools":https://gpgtools.org and then build gpgme from source.
+
+
+## Building
+
+To build the `gnupg-for-java.jar` and `libgnupg-for-java.so` in build/, run
+this:
+
+ ant clean release
+
+You can run the test suite using `ant` also:
+
+ ant test
+
+If you want the optional javadoc in build/docs/, run:
+
+ ant javadoc
+
+
+## Hacking Notes
+
+Please conform to our code format standard. For C files use
+./format-code.sh. For Java files, use Eclipse with the Android mode from the
+Android project. The default Eclipse formatting is usually close enough.
+
diff --git a/build.properties b/build.properties
index 7534499..ed3289b 100644
--- a/build.properties
+++ b/build.properties
@@ -1,27 +1,15 @@
# default build.properties
-app.name=javagnupg
-app.type=@APP-TYPE@
-app.version=0.1.5-ascii-armor-linux-i386-ia64
+app.name=gnupg-for-java
+app.version=0.2-pre
app.customer=LGPL
app.vendor=freiheit.com technologies gmbh
-app.year=2008
-
-lib=./lib
+app.year=2014
build.compiler=modern
compile.debug=true
compile.deprecation=false
compile.optimize=true
-#where to put the source code
-src=src
-
-#where to put the generated class files
-build=build
-
-#where to put the generated class files
-dist=dist
-
#where to put etc stuff :-)
etc=etc
diff --git a/build.xml b/build.xml
index cf4da56..b2d2072 100644
--- a/build.xml
+++ b/build.xml
@@ -1,105 +1,100 @@
-
+
+
+
+
+
+
+
-
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
-
-
-
+
-
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
+
-
+
-
+
+
-
-
+
-
-
-
-
+
+
+
-
-