Class DBScannerDecryptVerifier

java.lang.Object
overit.geocall.basic.bl.encryption.DBScannerDecryptVerifier
All Implemented Interfaces:
DBScanner

public class DBScannerDecryptVerifier extends Object implements DBScanner
This scanner allows to verify the encryption of values storage in the database. It decrypts only the values inside the columns specified in the input of the constructor. It uses the decryptKey passed as constructor input to decrypt value. The key can be empty to manage the value in clear, but it must not be null. If there is an error with one value, a SQLException will be thrown. It uses the ResultSet to looping on the table, so it doesn't load in memory all rows of the table.
  • Constructor Details

    • DBScannerDecryptVerifier

      public DBScannerDecryptVerifier(String decryptKey, List<String> columns)
      Constructor of this database scanner.
      Parameters:
      decryptKey - the key to decrypt the value storage in the database. It could be empty to manage the value in clear, * but it must not be null
      columns - the List of strings that defines which columns contains the encrypted values.
  • Method Details

    • scan

      public void scan(DBCursor dbc) throws SQLException
      Description copied from interface: DBScanner
      Applies this function to the given argument.
      Specified by:
      scan in interface DBScanner
      Parameters:
      dbc - the cursor opend over the statement
      Throws:
      SQLException - in case of an sql error