package com.bcxin.tenant.domain.utils.encry;


import java.util.HashMap;
import java.util.Map;

public class SignValidation {

    public static boolean sign_validation(String clientId,String clientSecret,String timeStamp,String randomStr,String signStr){
        boolean  flag=false;

        Map map=new HashMap();
        map.put("clientId",clientId);
        map.put("timeStamp",timeStamp);
        map.put("randomStr",randomStr);
        String signTemp=CreatRandomStr.createStr(map,clientSecret);

        String sign= Md5.encoderMD5(signTemp);

        if(sign.equals(signStr)){
            flag=true;
        }else{
            flag=false;

        }
        return flag;
    }
}
