aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/utils
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2013-08-28 20:55:07 +0200
committerBananeweizen <bananeweizen@gmx.de>2013-08-28 20:55:07 +0200
commit82e732957b6973ca491d53a8ebf4779ebf199be8 (patch)
tree1010f97b03ad61f3cc4d9515e08fbfce9053b951 /tests/src/cgeo/geocaching/utils
parent44696cc0297906bba2bf2b26b2db86196a1855fc (diff)
downloadcgeo-82e732957b6973ca491d53a8ebf4779ebf199be8.zip
cgeo-82e732957b6973ca491d53a8ebf4779ebf199be8.tar.gz
cgeo-82e732957b6973ca491d53a8ebf4779ebf199be8.tar.bz2
findbugs cleanup: default encoding
Diffstat (limited to 'tests/src/cgeo/geocaching/utils')
-rw-r--r--tests/src/cgeo/geocaching/utils/CryptUtilsTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/utils/CryptUtilsTest.java b/tests/src/cgeo/geocaching/utils/CryptUtilsTest.java
index e727747..9264d29 100644
--- a/tests/src/cgeo/geocaching/utils/CryptUtilsTest.java
+++ b/tests/src/cgeo/geocaching/utils/CryptUtilsTest.java
@@ -23,4 +23,16 @@ public class CryptUtilsTest extends TestCase {
public static void testIssue1902() {
assertEquals("ƖƖlƖƖƖƖ", CryptUtils.rot13("ƖƖyƖƖƖƖ"));
}
+
+ public static void testSha1() {
+ assertEquals("da39a3ee5e6b4b0d3255bfef95601890afd80709", CryptUtils.sha1(""));
+ // expected value taken from debugger. should assure every developer uses UTF-8
+ assertEquals("cf2f343f59cea81afc0a5a566cb138ba349c548f", CryptUtils.sha1("äöü"));
+ }
+
+ public static void testMd5() {
+ assertEquals("d41d8cd98f00b204e9800998ecf8427e", CryptUtils.md5(""));
+ // expected value taken from debugger. should assure every developer uses UTF-8
+ assertEquals("a7f4e3ec08f09be2ef7ecb4eea5f8981", CryptUtils.md5("äöü"));
+ }
}