41 lines
710 B
Java
41 lines
710 B
Java
package de.gurkengewuerz.monitoring.object;
|
|
|
|
|
|
import java.io.File;
|
|
|
|
/**
|
|
* Created by gurkengewuerz.de on 25.10.2017.
|
|
*/
|
|
public class PrivateKey {
|
|
|
|
private String path;
|
|
private String pass;
|
|
private boolean exists = false;
|
|
|
|
public PrivateKey(String path, String pass) {
|
|
this.path = path;
|
|
this.pass = pass;
|
|
exists = new File(path).exists();
|
|
}
|
|
|
|
public PrivateKey(String path) {
|
|
this(path, "");
|
|
}
|
|
|
|
public boolean hasPassword() {
|
|
return !pass.isEmpty();
|
|
}
|
|
|
|
public boolean exists() {
|
|
return exists;
|
|
}
|
|
|
|
public String getPath() {
|
|
return path;
|
|
}
|
|
|
|
public String getPassword() {
|
|
return pass;
|
|
}
|
|
}
|