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 ICryptoSessionKeyProviderSession key provider for AES-256 keys that can be used e.g. for AES-256-CBC or AES-256-GCM -
Method Summary
-
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_256
Session key provider for AES-256 keys that can be used e.g. for AES-256-CBC or AES-256-GCM
-
-
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.
-