Java MD5 Check isValidMD5(String md5)

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

Description

is Valid MD

License

Open Source License

Declaration

private static boolean isValidMD5(String md5) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static boolean isValidMD5(String md5) {
        if (md5 == null) {
            return false;
        }// ww  w.j ava2 s .c  o m

        // Check length AND characters
        return md5.matches("^[0-9A-Fa-f]{32}+$");
    }
}

Related

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