|
SafeJDBC v2.00 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.safejdbc.api.SafeJdbcSetter
public final class SafeJdbcSetter
Main API for SafeJDBC Driver loading & setting cryptography elements.
Driver.Provider, a symmetric
Algorithm and to set a 128 bit encryption Key
or Passphrase.
Class.forName("com.safejdbc.api.Driver").newInstance();
DriverManager.getConnection() method.
| Constructor Summary | |
|---|---|
protected |
SafeJdbcSetter()
Constructor |
| Method Summary | |
|---|---|
Object |
clone()
This class cannot be clonned for security reasons |
static SafeJdbcSetter |
getInstance()
Creates a new SafeJdbcSetter instance. |
int |
getStatus()
Returns the Status value after an attempt to load the SafeJDBC Driver. |
void |
setAlgorithm(String sAlgorithm)
Sets the symmetric algorithm to be used, with the mode and the padding. |
void |
setKey(String sUserId,
char[] caPassphrase)
Sets the 128 bit symmetric PBE (Passphrase Based encryption Key) key to be used. |
void |
setKey(String sUserId,
Key key)
Sets the 128 bit symmetric Key to be used. |
void |
setProvider(String sProvider)
Sets the cryptographic Provider to use. |
void |
setSafeJdbcDbUrl(String safeJdbcDbUrl)
Sets the SafeJDBC Db URL. |
void |
setSafeJdbcDbUrl(String safeJdbcDbUrl,
Properties props)
Sets the SafeJDBC Db URL with Properties. |
void |
setSafeJdbcDbUrl(String safeJdbcDbUrl,
String sUser,
String sPassword)
Sets the SafeJDBC Db URL with Db User and Db Password. |
void |
setSafeJdbcLogFile(String sSafeJdbcLogFile)
Sets the Log file. |
void |
setWrappedDriverName(String wrappedDriverName)
Sets the Wrapped JDBC Driver Name. |
String |
toString()
Returns a human readable String containing detailed info about the status of SafeJdbcSetter. |
static void |
unlock()
Unlocks SafeJDBC after driver initialization. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected SafeJdbcSetter()
throws SQLException
SQLException| Method Detail |
|---|
public static SafeJdbcSetter getInstance()
throws SQLException
SQLException - if SafeJdbcSetter instance already exists and is locked.public static void unlock()
public int getStatus()
Status value after an attempt to load the SafeJDBC Driver.
Statuspublic void setWrappedDriverName(String wrappedDriverName)
wrappedDriverName - The Wrapped Driver Name to be set.public void setSafeJdbcDbUrl(String safeJdbcDbUrl)
safeJdbcDbUrl - The SafeJDBC database URL to be set, with all the
parameters (including userid & password).
public void setSafeJdbcDbUrl(String safeJdbcDbUrl,
String sUser,
String sPassword)
safeJdbcDbUrl - The SafeJDBC database URL to be set.sUser - the database user on whose behalf the connection
is being madesPassword - the user's password for the database.
public void setSafeJdbcDbUrl(String safeJdbcDbUrl,
Properties props)
safeJdbcDbUrl - The SafeJDBC database URL to set.props - a list of arbitrary string tag/value pairs as
connection arguments. Generally at least a "user" and "password"
property should be included.public void setSafeJdbcLogFile(String sSafeJdbcLogFile)
sSafeJdbcLogFile - the Log File name
public void setAlgorithm(String sAlgorithm)
throws IllegalArgumentException
Algo class contains all
the valid algorithms to use.Algo.BLOWFISH_CFB.
sAlgorithm - The symetric algorithm to be used.
IllegalArgumentException - if the algorithm name is invalidpublic void setProvider(String sProvider)
Provider.PROVIDER_CRYPTIX.
sProvider - The provider to be used
IllegalArgumentException - if the Provider name is invalid
public void setKey(String sUserId,
Key key)
Key to be used.
sUserId - The SafeJDBC UserId owner of this Key.key - the Key to be used for cipher operations.
IllegalArgumentException - if the sUserId name is null or the key is null
public void setKey(String sUserId,
char[] caPassphrase)
throws IllegalArgumentException
sUserId - The UserId who owns this Key.caPassphrase - the passphrase for the PBE key generation.
IllegalArgumentException - if the userid or passphrase is invalidpublic String toString()
toString in class Object
public final Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException
|
SafeJDBC v2.00 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||