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 * <p>
26 * This class is immutable and thread-safe.
27 *
28 * @see <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html">Java Cryptography
29 * Architecture Standard Algorithm Name Documentation</a>
30 * @since 1.7
31 * @version $Id: MessageDigestAlgorithms.java 1465850 2013-04-09 00:46:31Z sebb $
32 */
33 public class MessageDigestAlgorithms {
34
35 private MessageDigestAlgorithms() {
36 // cannot be instantiated.
37 }
38
39 /**
40 * The MD2 message digest algorithm defined in RFC 1319.
41 */
42 public static final String MD2 = "MD2";
43
44 /**
45 * The MD5 message digest algorithm defined in RFC 1321.
46 */
47 public static final String MD5 = "MD5";
48
49 /**
50 * The SHA-1 hash algorithm defined in the FIPS PUB 180-2.
51 */
52 public static final String SHA_1 = "SHA-1";
53
54 /**
55 * The SHA-256 hash algorithm defined in the FIPS PUB 180-2.
56 */
57 public static final String SHA_256 = "SHA-256";
58
59 /**
60 * The SHA-384 hash algorithm defined in the FIPS PUB 180-2.
61 */
62 public static final String SHA_384 = "SHA-384";
63
64 /**
65 * The SHA-512 hash algorithm defined in the FIPS PUB 180-2.
66 */
67 public static final String SHA_512 = "SHA-512";
68
69 }