* returns public private key for applcation
* @return app key values
*/
public static ApplicationKey getApplicationKey() {
ApplicationKey appKey = null;
Connection con = null;
try {
con = DBUtils.getConn();
PreparedStatement stmt = con.prepareStatement("select * from application_key");
ResultSet rs = stmt.executeQuery();
while (rs.next()) {
appKey= new ApplicationKey();
appKey.setId(rs.getLong("id"));
appKey.setPassphrase(EncryptionUtil.decrypt(rs.getString("passphrase")));
appKey.setPrivateKey(EncryptionUtil.decrypt(rs.getString("private_key")));
appKey.setPublicKey(rs.getString("public_key"));
}
DBUtils.closeRs(rs);
DBUtils.closeStmt(stmt);