Home | History | Annotate | Download | only in security
      1 /*
      2  * Copyright (C) 2009 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *     http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 package tests.targets.security;
     17 
     18 import tests.security.MessageDigestTest;
     19 
     20 public class MessageDigestTestSHA1 extends MessageDigestTest {
     21 
     22     public MessageDigestTestSHA1() {
     23         super("SHA-1");
     24 
     25         super.source1 = "abc";
     26         super.source2 = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq";
     27         super.expected1 = singleblock;
     28         super.expected2 = multiblock;
     29         super.expected3 = longmessage;
     30     }
     31 
     32     // results from fips180-2
     33     private static final String singleblock = "a9993e364706816aba3e25717850c26c9cd0d89d";
     34     private static final String multiblock = "84983e441c3bd26ebaae4aa1f95129e5e54670f1";
     35     private static final String longmessage = "34aa973cd4c4daa4f61eeb2bdbad27316534016f";
     36 
     37 }
     38