All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yuweix.kuafu.permission.dto.PermissionExportDto Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package com.yuweix.kuafu.permission.dto;


import com.yuweix.kuafu.core.encrypt.SecurityUtil;
import com.yuweix.kuafu.core.json.JsonUtil;

import java.io.Serializable;
import java.util.List;


/**
 * @author yuwei
 */
public class PermissionExportDto implements Serializable {
	/**
	 *
	 */
	private static final long serialVersionUID = 1L;
	private static final String SALT = "Rewfe5..;;43po6baasfpcxr034;;',";

	private List list;
	private String sign;

	public PermissionExportDto() {

	}
	public PermissionExportDto(List list) {
		this.setList(list);
	}


	public boolean verify() {
		return this.toSgin().equals(this.sign);
	}

	private String toSgin() {
		return SecurityUtil.getMd5(JsonUtil.toJSONString(list) + SALT);
	}

	public List getList() {
		return list;
	}

	public void setList(List list) {
		this.list = list;
		this.sign = this.toSgin();
	}

	public String getSign() {
		return sign;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy