Package com.helger.phase4.crypto
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final ICryptoSessionKeyProviderSession key provider for AES-128 keys that can be used e.g. for AES-128-CBC or AES-128-GCMstatic final ICryptoSessionKeyProviderDeprecated, for removal: This API element is subject to removal in a future version.static final ICryptoSessionKeyProviderSession key provider for AES-256 keys that can be used e.g. for AES-256-CBC or AES-256-GCMstatic final ICryptoSessionKeyProviderDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionGet or create a new symmetric session key.
-
Field Details
-
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_GCMDeprecated, for removal: This API element is subject to removal in a future version. -
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_GCMDeprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
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.
-