<NME> CryptUtilsTest.java
<BEF> package cgeo.geocaching.utils;

import junit.framework.TestCase;

public class CryptUtilsTest extends TestCase {
    public void testROT13() {
        assertThat(CryptUtils.rot13("")).isEqualTo("");
        assertThat(CryptUtils.rot13((String) null)).isEqualTo("");
        assertThat(CryptUtils.rot13("Cache hint")).isEqualTo("Pnpur uvag");
        assertThat(CryptUtils.rot13("Cache [plain] hint")).isEqualTo("Pnpur [plain] uvag");
    }

    public static void testConvertToGcBase31() {
        assertEquals("1186660", CryptUtils.convertToGcBase31("GC1PKK9"));
        assertEquals("4660", CryptUtils.convertToGcBase31("GC1234"));
        assertEquals("61731", CryptUtils.convertToGcBase31("GCF123"));
    }
}

    @Test
    public void testMd5() {
        assertThat(CryptUtils.md5("")).isEqualTo("d41d8cd98f00b204e9800998ecf8427e");
        // expected value taken from debugger. should assure every developer uses UTF-8
        assertThat(CryptUtils.md5("äöü")).isEqualTo("a7f4e3ec08f09be2ef7ecb4eea5f8981");
    }
}

<MSG> Unified methods for BASE 31

<DFF> @@ -1,5 +1,7 @@
 package cgeo.geocaching.utils;
 
+import cgeo.geocaching.connector.gc.GCBase;
+
 import junit.framework.TestCase;
 
 public class CryptUtilsTest extends TestCase {
@@ -11,8 +13,8 @@ public class CryptUtilsTest extends TestCase {
     }
 
     public static void testConvertToGcBase31() {
-        assertEquals("1186660", CryptUtils.convertToGcBase31("GC1PKK9"));
-        assertEquals("4660", CryptUtils.convertToGcBase31("GC1234"));
-        assertEquals("61731", CryptUtils.convertToGcBase31("GCF123"));
+        assertEquals(1186660, GCBase.gccodeToGCId("GC1PKK9"));
+        assertEquals(4660, GCBase.gccodeToGCId("GC1234"));
+        assertEquals(61731, GCBase.gccodeToGCId("GCF123"));
     }
 }

Unified methods for BASE 31