Interface ICryptoSessionKeyProvider


public interface ICryptoSessionKeyProvider
Interface for a "session key" provider, that is used for encrypting documents. Default instances for AES-128 and AES-256 are provided for simplicity.
Author:
Philip Helger
  • Field Details

    • INSTANCE_RANDOM_AES_128

      static final ICryptoSessionKeyProvider INSTANCE_RANDOM_AES_128
      Session key provider for AES-128 keys that can be used e.g. for AES-128-CBC or AES-128-GCM
    • INSTANCE_RANDOM_AES_128_GCM

      @Deprecated(forRemoval=true, since="3.0.2") static final ICryptoSessionKeyProvider INSTANCE_RANDOM_AES_128_GCM
      Deprecated, for removal: This API element is subject to removal in a future version.
    • INSTANCE_RANDOM_AES_256

      static final ICryptoSessionKeyProvider INSTANCE_RANDOM_AES_256
      Session key provider for AES-256 keys that can be used e.g. for AES-256-CBC or AES-256-GCM
    • INSTANCE_RANDOM_AES_256_GCM

      @Deprecated(forRemoval=true, since="3.0.2") static final ICryptoSessionKeyProvider INSTANCE_RANDOM_AES_256_GCM
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getSessionKey

      @Nonnull SecretKey getSessionKey()
      Get or create a new symmetric session key. This method may only throw unchecked exceptions.
      Returns:
      A new session key. Must not be null.