aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/shatest.java
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2016-09-30 16:24:48 +0000
committerAndrew Haley <aph@gcc.gnu.org>2016-09-30 16:24:48 +0000
commit07b78716af6a9d7c9fd1e94d9baf94a52c873947 (patch)
tree3f22b3241c513ad168c8353805614ae1249410f4 /libjava/testsuite/libjava.lang/shatest.java
parenteae993948bae8b788c53772bcb9217c063716f93 (diff)
downloadgcc-07b78716af6a9d7c9fd1e94d9baf94a52c873947.zip
gcc-07b78716af6a9d7c9fd1e94d9baf94a52c873947.tar.gz
gcc-07b78716af6a9d7c9fd1e94d9baf94a52c873947.tar.bz2
Makefile.def: Remove libjava.
2016-09-30 Andrew Haley <aph@redhat.com> * Makefile.def: Remove libjava. * Makefile.tpl: Likewise. * Makefile.in: Regenerate. * configure.ac: Likewise. * configure: Likewise. * gcc/java: Remove. * libjava: Likewise. From-SVN: r240662
Diffstat (limited to 'libjava/testsuite/libjava.lang/shatest.java')
-rw-r--r--libjava/testsuite/libjava.lang/shatest.java39
1 files changed, 0 insertions, 39 deletions
diff --git a/libjava/testsuite/libjava.lang/shatest.java b/libjava/testsuite/libjava.lang/shatest.java
deleted file mode 100644
index 4cc6d4f..0000000
--- a/libjava/testsuite/libjava.lang/shatest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-import java.security.*;
-
-class shatest {
-
- // gnu-crypto/source/gnu/testlet/gnu/crypto/hash/TestOfSha160.java
-
- public static void main(String[] argv) {
- MessageDigest md=null;
- try {
- md = MessageDigest.getInstance("SHA-1");
- } catch (Exception e) {
- e.printStackTrace();
- }
- md.update("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".getBytes(), 0, 56);
- String exp = "84983E441C3BD26EBAAE4AA1F95129E5E54670F1";
- String result = toString(md.digest());
- System.out.println(exp);
- System.out.println(result);
- if (!exp.equals(result))
- System.out.println("NOT EQUAL!");
-
- }
-
- public static String toString(byte[] ba) {
- return toString(ba, 0, ba.length);
- }
- public static final String toString(byte[] ba, int offset, int length) {
- char[] buf = new char[length * 2];
- for (int i = 0, j = 0, k; i < length; ) {
- k = ba[offset + i++];
- buf[j++] = HEX_DIGITS[(k >>> 4) & 0x0F];
- buf[j++] = HEX_DIGITS[ k & 0x0F];
- }
- return new String(buf);
- }
-
- private static final char[] HEX_DIGITS = "0123456789ABCDEF".toCharArray();
-
-}