enabled 추가

master
mjkhan21 2 months ago
parent dc6cfdbed1
commit c038e7bbc5

@ -43,6 +43,7 @@ public class GPKI extends AbstractComponent {
* @return
*/
public String encrypt(String serverID, String data) {
if (!conf.enabled) return data;
if (isEmpty(data)) return "";
try {
@ -62,6 +63,7 @@ public class GPKI extends AbstractComponent {
* @return
*/
public String decrypt(String encrypted) {
if (!conf.enabled) return encrypted;
if (isEmpty(encrypted)) return "";
try {
@ -277,7 +279,7 @@ public class GPKI extends AbstractComponent {
* }</code></pre>
* @author mjkhan
*/
public static class Config extends AbstractComponent {
public static class Config {
private static Config conf;
public static Config get() {
@ -291,6 +293,7 @@ public class GPKI extends AbstractComponent {
return conf;
}
private boolean enabled;
private String
charset,
license,
@ -301,6 +304,20 @@ public class GPKI extends AbstractComponent {
env,
sig;
/** .
* @return
*/
public boolean isEnabled() {
return enabled;
}
/** .
* @param enabled
*/
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
/**charset() .
* @return charset
*/

@ -1,6 +1,6 @@
{
"enabled": true, /* 활성화(사용) 여부 */
"license": "C:\\GPKI\\Lic", /* 이용기관 GPKI API 라이센스 디렉토리 */
"charset": "UTF-8", /* 문자셋 */
"server": {

Loading…
Cancel
Save