diff --git a/core/java/src/com/nettgryppa/security/HashCash.java b/core/java/src/com/nettgryppa/security/HashCash.java
index 56bc35861c0e006968bcf26e0cbedf3c5de43c1c..be8d92a471162ba8d71420801966f91b87d72ce8 100644
--- a/core/java/src/com/nettgryppa/security/HashCash.java
+++ b/core/java/src/com/nettgryppa/security/HashCash.java
@@ -212,7 +212,6 @@ public class HashCash implements Comparable<HashCash> {
   /**
        * Two objects are considered equal if they are both of type HashCash and have an identical string representation
        */
-  /* FIXME missing hashCode() method FIXME */
   @Override
   public boolean equals(Object obj) {
     if(obj instanceof HashCash)
@@ -220,6 +219,14 @@ public class HashCash implements Comparable<HashCash> {
     else
       return super.equals(obj);
   }
+
+  /**
+   * Implemented based on definition of equals()
+   */
+  @Override
+  public int hashCode() {
+      return ("HashCash:"+toString()).hashCode();
+  }
   
   /**
        * Returns the canonical string representation of the HashCash
@@ -330,14 +337,15 @@ private static long bytesToLong(byte[] b) {
     List<String> tempList;
     boolean first = true;
     
-    for(String key: extensions.keySet()) {
+    for(Map.Entry<String, List<String>> entry: extensions.entrySet()) {
+        String key = entry.getKey();
       if(key.contains(":") || key.contains(";") || key.contains("="))
           throw new IllegalArgumentException("Extension key contains an illegal character. " + key);
       if(!first)
         result.append(";");
       first = false;
       result.append(key);
-      tempList = extensions.get(key);
+      tempList = entry.getValue();
       
       if(null != tempList) {
         result.append("=");
@@ -442,7 +450,7 @@ private static long bytesToLong(byte[] b) {
   public static int estimateValue(int secs) throws NoSuchAlgorithmException  {
     initEstimates();
     int result = 0;
-    long millis = secs * 1000 * 65536;
+    long millis = secs * 1000L * 65536;
     millis /= milliFor16;
     
     while(millis > 1) {
diff --git a/core/java/src/gnu/crypto/hash/Sha256Standalone.java b/core/java/src/gnu/crypto/hash/Sha256Standalone.java
index cb1e7eaabe15f2dfd40eb575d9e3ec6b9fd184ef..465675cd3349cb02d6719bc740b1880fd4467662 100644
--- a/core/java/src/gnu/crypto/hash/Sha256Standalone.java
+++ b/core/java/src/gnu/crypto/hash/Sha256Standalone.java
@@ -95,7 +95,7 @@ public class Sha256Standalone extends BaseHashStandalone {
    private static final int[] w = new int[64];
 
    /** caches the result of the correctness test, once executed. */
-   private static Boolean valid;
+   private static volatile Boolean valid;
 
    /** 256-bit interim result. */
    private int h0, h1, h2, h3, h4, h5, h6, h7;
@@ -218,7 +218,7 @@ public class Sha256Standalone extends BaseHashStandalone {
          md.update((byte) 0x62); // b
          md.update((byte) 0x63); // c
          String result = "broken"; //Util.toString(md.digest());
-         valid = new Boolean(DIGEST0.equals(result));
+         valid = Boolean.valueOf(DIGEST0.equals(result));
       }
 
       return valid.booleanValue();