metcarob.com.common.io.db
XML Connection Manager
Encrypt a password
Salt pot
To use the salt pot
1. Create a random saltpot and output it.
2. Copy and paste the byte creation and use it to instalise the salt pot.
For Step 1 use:
-
saltPot sp = new saltPot(2048);
-
sp.dumpContents();
For Step 2 use:
-
saltPot sp = null;
-
{byte[] salt = {
-
(byte)0x41, (byte)0xBB, (byte)0xF7, (byte)0xC8, (byte)0x06, (byte)0xF9, (byte)0x42, (byte)0xD8,
-
...
-
(byte)0x21, (byte)0x13, (byte)0x74, (byte)0x34, (byte)0x94, (byte)0x7B, (byte)0x70, (byte)0x99
-
};
-
sp = new saltPot(salt);};
metcarob.com.common.security.saltPot
Secret Manager
metcarob.com.common.security.secret.secretManager
DBFile
-
public class LocalSettingsFile extends DBFile {
-
super(string, b);
-
}
-
-
//SETTINGSFIELDLIST
-
"id integer not null PRIMARY KEY," +
-
"name TEXT not null unique," +
-
"systype integer not null DEFAULT 0," +
-
"svnroot TEXT not null," +
-
"roaccountid TEXT," +
-
"ROJDBCUrl TEXT" +
-
")";
-
this.executeUpdate(query);
-
}
-
-
@Override
-
protected void UpdateDataStructureDerived(int p_fromVer,
-
if ((p_fromVer==0) && (p_toVer==1)) {
-
this.executeUpdate(query);
-
}
-
}
-
-
@Override
-
protected int getCodeDBFileVersion() {
-
return 1;
-
}
-
}
Usage of XMLUtilities class
Output XML Node:
-
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
-
XPath xPath = XPathFactory.newInstance().newXPath();
-
DataFile = xPath.evaluate("/SingleNodeServerSettings/datafile", doc.getDocumentElement());
-
tmp = xPath.evaluate("/SingleNodeServerSettings/port", doc.getDocumentElement());
-
-
NodeList nodes = (NodeList)xPath.evaluate(
-
"/SingleNodeServerSettings/masteradminuser/publickey",
-
doc.getDocumentElement(), XPathConstants.NODESET
-
);
RJM Article Type
Quick Reference