Interface IEncryptionMigrator


public interface IEncryptionMigrator
Interface for migrating encrypted fields in a based database when the encryption key changes.
Since:
8.5.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    performMigration(DataSource dataSource, char[] newEncryptionPassword, String newEncryptionAlgorithm, Set<String> additionalEncryptionScopes, int threadCount)
    Performs the database migration.
  • Method Details

    • performMigration

      void performMigration(DataSource dataSource, char[] newEncryptionPassword, String newEncryptionAlgorithm, Set<String> additionalEncryptionScopes, int threadCount) throws FcPersistenceException
      Performs the database migration. Some fields of some entities are encrypted by the application. This method should be called when the encryption key changes. Assumption: The encryptors and decryptors were already set up so that entities are decrypted with the old encryption key and encrypted with the new key.
      Parameters:
      dataSource - The DataSource to use for the migration.
      newEncryptionPassword - The new encryption password.
      newEncryptionAlgorithm - The new encryption algorithm.
      additionalEncryptionScopes - Optional scopes for encryption; can be null or empty; if null, only unscoped data will be re-encrypted. If not null, data with the specified scopes will also be re-encrypted. Example scope: "form" for form data encryption.
      threadCount - The number of threads to use parallel execution.
      Throws:
      FcPersistenceException