com.uqpay.sdk.config.SecretKey Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of uqpay-payment Show documentation
Show all versions of uqpay-payment Show documentation
uqpay payment server side SDK
package com.uqpay.sdk.config;
import com.uqpay.sdk.utils.enums.SignTypeEnum;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
public class SecretKey implements Serializable {
private SignTypeEnum signType = SignTypeEnum.RSA;
/**
* RSA Key Or MD5 Salt Content
* Tips: for RSA, please remove the comment line (which start with ----) and the line break.
* Tips: if the content is not empty, we will ignore the path
*/
private String content;
/**
* The pem file path of RSA Private Key
* Or The txt file path of MD5 Salt
* Tips: make sure you have the permission to read.
*/
private String path;
public boolean verify() {
return signType != null && (StringUtils.isNotBlank(content) || StringUtils.isNotBlank(path));
}
public SignTypeEnum getSignType() {
return signType;
}
public void setSignType(SignTypeEnum signType) {
this.signType = signType;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
}