package net.yyc.common.taxhelper.entity.model;

import lombok.Data;

import java.util.Base64;

/**
 * {@code EncryptLoginInfo} 类登录加密参数
 *
 * @author Hengchen.Sun
 * @version 1.0.0
 * @date 2021-02-23
 * @since ver.1.0.0
 */
@Data
public class EncryptLoginInfo extends TaxHelperModel {

	private static final long serialVersionUID = -6028459062639673570L;

	private final String data;
	private final String sign;
	private final String key;

	public EncryptLoginInfo(String data, byte[] sign, byte[] key, String appId) {
		this.data = data;
		this.sign = Base64.getEncoder().encodeToString(sign);
		this.key = Base64.getEncoder().encodeToString(key);
		this.appId = appId;
	}
}
