View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  
18  package org.apache.commons.codec.digest;
19  
20  import java.security.MessageDigest;
21  
22  /**
23   * Standard {@link MessageDigest} algorithm names from the <cite>Java Cryptography Architecture Standard Algorithm Name
24   * Documentation</cite>.
25   *
26   * @see <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html">Java Cryptography
27   *      Architecture Standard Algorithm Name Documentation</a>
28   * @since 1.7
29   * @version $Id: MessageDigestAlgorithms.html 889935 2013-12-11 05:05:13Z ggregory $
30   */
31  public class MessageDigestAlgorithms {
32  
33      private MessageDigestAlgorithms() {
34          // cannot be instantiated.
35      }
36  
37      /**
38       * The MD2 message digest algorithm defined in RFC 1319.
39       */
40      public static final String MD2 = "MD2";
41  
42      /**
43       * The MD5 message digest algorithm defined in RFC 1321.
44       */
45      public static final String MD5 = "MD5";
46  
47      /**
48       * The SHA-1 hash algorithm defined in the FIPS PUB 180-2.
49       */
50      public static final String SHA_1 = "SHA-1";
51  
52      /**
53       * The SHA-256 hash algorithm defined in the FIPS PUB 180-2.
54       */
55      public static final String SHA_256 = "SHA-256";
56  
57      /**
58       * The SHA-384 hash algorithm defined in the FIPS PUB 180-2.
59       */
60      public static final String SHA_384 = "SHA-384";
61  
62      /**
63       * The SHA-512 hash algorithm defined in the FIPS PUB 180-2.
64       */
65      public static final String SHA_512 = "SHA-512";
66  
67  }