package sdfg;

import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class sdfg {
    
    public static String createMD5(String pw) throws NoSuchAlgorithmException
    {
        MessageDigest md;
        md=MessageDigest.getInstance("MD5");
        md.update(pw.getBytes());
        String re=new BigInteger(1,md.digest()).toString(16);                
        return re;        
    }
    
    public static void main(String[] args) throws NoSuchAlgorithmException 
    {
        String pw="asdfaf";
        
        System.out.println(createMD5(pw));
    }
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-28
  • 2021-12-31
  • 2021-11-21
  • 2022-01-08
  • 2021-12-17
猜你喜欢
  • 2022-12-23
  • 2021-08-15
  • 2021-11-06
  • 2021-09-23
  • 2021-09-13
  • 2021-09-14
相关资源
相似解决方案