rekey()
Implements various stages of the re-key operation.
Syntax
public void rekey (String tableName, Connection[] conn, PreparedStatement[] stmt, ResultSet[] rows, byte[][] cipherText, String[] rowIds, Integer[] cnt) throws SQLException
Request Parameters
Parameter | Type | Description |
---|---|---|
conn | Array | Input/output array, where element 0 contains database connection used for re-key operation. Note: If conn[0] == null, create database connection and store connection handle into conn[0] to be returned to the caller and to be passed back on subsequent calls. |
stmt | Array | Input/output array of database statement handles used for re-key operation; elements 0 through 2 are used as follows: • If stmt[0] == null, create statement to get ciphertext from the token vault and store the statement handle into stmt[0] to be returned to the caller and to be passed back on subsequent calls this statement should also extract unique row identifiers and store them into rowIds to be returned to the caller and to be passed back to identify rows to be updated. • Execute the select statement created in stmt[0] and save the result set into rs[0] to be returned to the caller and to be passed back on subsequent calls. • If stmt[1] == null, create statement to update rows in the token vault and store the statement handle into stmt[1] to returned to the caller and to be passed back on subsequent calls the update statement should update rows based on unique row identifiers passed via rowIds. • If stmt[2] == null, create statement to commit updated rows to the token vault and store the statement handle into stmt[0] to be returned to the caller and to be passed back on subsequent calls. • Count - an array where the 0th element is used in this operation to keep track of the number of rows extracted from the database. Note: If count == 0 it indicates a cleanup call, during which all statement handles and result sets allocated above are released and the database connection is closed. The code should then return to the caller. |
RowIds | String array | An array of identifiers that refer to rows in the result set used in this operation. Row identifiers save the actual number of rows updated into Count. Note: If rowIds[0] == null, it indicates SELECT call to get ciphertext values from the token vault get more value from the result set rs[0] and return them to the caller up to count values should be returned save the actual number of rows extracted from the database into oCount [0]. If rowIds[0] != null, it indicates UPDATE call use unique row identifiers passed via rowIds to update ciphertext in the token vault save the actual number of rows updated into oCount[0]. |