|
SafeJDBC v2.00 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.safejdbc.api.ColumnsCipher
public final class ColumnsCipher
API to update the SafeJdbc Catalog using a list of tables and columns
to cipher, i.e. to encrypt or decrypt.
Class also updates the application columns with the cipher values.
addColumn methods allow all the columns to be encrypted/decrypted
to be specified.execute(int) method performs all the work in a SQL transaction.
| Field Summary | |
|---|---|
static int |
DECRYPT_MODE
The mode for sql data decryption |
static int |
ENCRYPT_MODE
The mode for sql data encryption |
| Constructor Summary | |
|---|---|
protected |
ColumnsCipher(Connection connection)
Constructor. |
| Method Summary | |
|---|---|
void |
addColumn(String sTableColumn)
Adds a column to the list of Sql columns to be encrypted/decrypted using the "table.column" syntax. |
void |
addColumn(String sTable,
String sColumn)
Adds a column to the list of Sql columns to be encrypted/decrypted. |
void |
addColumnsfromFile(String sCipherColumnsIni)
Adds columns using values stored in an ini file. |
void |
defineJoinColumn(String sTableJoinColumn,
String sTableReferenceColumn)
Defines a Column as a Join Column with a Reference Column, using the "table.column" syntax. |
void |
defineJoinColumn(String sTableJoin,
String sJoinColumn,
String sTableReference,
String sReferenceColumn)
Defines a Column as a Join Column with a Reference Column. |
void |
defineJoinColumnsfromFile(String sCipherColumnsIni)
Defines Join columns using values in a ini file The ini filename must not contain any path info. |
void |
execute(int nMode)
Executes the update of the SafeJDBC Sql Store and executes the SQL UPDATE commands for each column to be encrypted or decrypted as specified with the addColumn method. |
static ColumnsCipher |
getInstance(Connection connection)
Returns a new ColumnsCipher instance. |
void |
setFileOutputStream(String sFile)
Sets the name of the output file for displaying results. |
void |
setOutputStream(OutputStream os)
Sets the name of the output stream for displaying results. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ENCRYPT_MODE
public static final int DECRYPT_MODE
| Constructor Detail |
|---|
protected ColumnsCipher(Connection connection)
throws SQLException
connection - the SafeJDBC Connection
SQLException - if the connection is not a SafeJDBC Connection
i.e. an instance of CipherConnection class.| Method Detail |
|---|
public static ColumnsCipher getInstance(Connection connection)
throws SQLException
connection - the SafeJDBC Connection
SQLException - if the connection is not a SafeJDBC Connection
i.e. an instance of CipherConnection class.public void setOutputStream(OutputStream os)
os - the output stream
public void setFileOutputStream(String sFile)
throws IOException
sFile - the output file
IOException - if an I/O error occurspublic void addColumn(String sTableColumn)
sTableColumn - the SQL column name with a dot, as in "table.column"
public void addColumn(String sTable,
String sColumn)
sTable - the SQL table namesColumn - the SQL column name
public void defineJoinColumn(String sTableJoinColumn,
String sTableReferenceColumn)
throws SQLException
addColumn.
sTableJoinColumn - the SQL Join column name with a dot, as in
"table.column"sTableReferenceColumn - the SQL Reference column name with a dot,
as in "table.column"
SQLException - if a table or column name is not a Cipher Column
public void defineJoinColumn(String sTableJoin,
String sJoinColumn,
String sTableReference,
String sReferenceColumn)
throws SQLException
addColumn.
sTableJoin - the table of the Join columnsJoinColumn - the SQL Join columnsTableReference - the table of the Reference columnsReferenceColumn - the SQL Reference column
SQLException - if a table or column name is not a Cipher Column
public void execute(int nMode)
throws SQLException
addColumn method.
nMode - the operating mode of this ColumnsCipher:
ENCRYPT_MODE: for column encryption
DECRYPT_MODE: for column decryption
SQLException - if a SQL error occurs during processing.
public void addColumnsfromFile(String sCipherColumnsIni)
throws FileNotFoundException,
IOException
sCipherColumnsIni - The ini file containing columns
to cipher, with path info.
FileNotFoundException - if the file is not found in the classpath
IOException - if an I/O error occurs
public void defineJoinColumnsfromFile(String sCipherColumnsIni)
throws FileNotFoundException,
IOException,
SQLException
sCipherColumnsIni - The ini file containing join columns &
reference columns, with path info.
FileNotFoundException - if the file is not found in the classpath
IOException - if an I/O error occurs
SQLException - if a table or column name is not a Cipher Column
|
SafeJDBC v2.00 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||