Java MD5 Check isValidMD5(String s)

Here you can find the source of isValidMD5(String s)

Description

is Valid MD

License

Mozilla Public License

Declaration

public static boolean isValidMD5(String s) 

Method Source Code

//package com.java2s;
/**/*  w  w  w. ja  va  2s  .  c  o  m*/
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 * Copyright 2015 Chiori-chan. All Right Reserved.
 * 
 * @author Chiori Greene
 * @email chiorigreene@gmail.com
 */

public class Main {
    public static boolean isValidMD5(String s) {
        return s.matches("[a-fA-F0-9]{32}");
    }
}

Related

  1. isValidMD5(String md5)
  2. isValidMd5Hash(String md5Hash)