package edu.neusoft.project.Test;

import edu.neusoft.project.util.DBconn;
import edu.neusoft.project.util.MyMD5Util;

import java.sql.Connection;
import java.sql.SQLException;

public class TestMD5 {


    public static void main(String[] args) {
        //slatUser  username;
        //dataStr   password;
        MyMD5Util md5Util= new MyMD5Util();

//        System.out.println(md5Util.encrypt32("1230").toUpperCase());

        System.out.println(md5Util.encryptUserSession("dsa","123").toUpperCase());
        System.out.println();
        System.out.println(md5Util.encryptUserToken("dsa","123").toUpperCase());

//        slatUser=
//        dataStr = 123&%0808bFcBwilliam*&&%%$$#@

        //         encryptUserSession           date                 encryptUserToken                   date

        //F31C661714572A6A63438104422955D9      20190624 -01                null                        null
        //F31C661714572A6A63438104422955D9      20190624 -02                null                        null
        //F31C661714572A6A63438104422955D9      20190624 -03                null                        null
        //F31C661714572A6A63438104422955D9      20190624 -04        F85E78DBDCA6CFE266448E4CD504F6EA    20190624 -04
        //F31C661714572A6A63438104422955D9      20190624 -05        F85E78DBDCA6CFE266448E4CD504F6EA    20190624 -05
        //F5F40691F14B7F39F559E4924AF0A7C6      20190625 -01        F85E78DBDCA6CFE266448E4CD504F6EA    20190625 -01
        //F5F40691F14B7F39F559E4924AF0A7C6      20190625 -02        F85E78DBDCA6CFE266448E4CD504F6EA    20190625 -02        William     20190625    544d43cbfe61dc66b45882b2123f2d41
        //762BF1444D1888282C27B234F433814D      20180626 -01        31B4FF3E8C751D657CE9FAD42B0F7A5B    20190626 -01        William     20190626    762bf1444d1888282c27b234f433814d
        //                                                          31b4ff3e8c751d657ce9fad42b0f7a5b                        william     20190626    762bf1444d1888282c27b234f433814d
        //                                                          31b4ff3e8c751d657ce9fad42b0f7a5b
        //                                                          31b4ff3e8c751d657ce9fad42b0f7a5b
        //                                                          31b4ff3e8c751d657ce9fad42b0f7a5b

    }
//    private static Connection connection = null;
//
//    public static void main(String[] args) {
//        connection=DBconn.getConn();
//        if (connection!=null){
//            System.out.println(connection+",success");
//          ef33f b7691 7e736 ab2e9 fcc20 087d1 c2    //32bit
//          ef33fb76917e736ab2e9fcc20087d1c2

//          62a8c46319f85b76dec5173d856236c1
//          62a8c46319f85b76dec5173d856236c1
//          ace37d51c29909071b0f3b158cefd84d
//          ace37d51c29909071b0f3b158cefd84d
//        }else{
//            System.out.println(connection+",failed");
//        }
//        try {
//            connection.close();
//        } catch (SQLException e) {
//            e.printStackTrace();
//        }
//    }
}
