Skip to content

Commit

Permalink
Improved comments
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Jan 6, 2025
1 parent 5ab089a commit a8a7da0
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
import org.apache.wss4j.common.ext.WSSecurityException;
import org.apache.wss4j.common.util.KeyUtils;

/**
* 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
*/
public interface ICryptoSessionKeyProvider
{
/**
Expand All @@ -36,7 +43,8 @@ public interface ICryptoSessionKeyProvider
SecretKey getSessionKey ();

/**
* Session key provider for AES-128 keys that can be used e.g. for AES-128-CBC or AES-128-GCM
* Session key provider for AES-128 keys that can be used e.g. for AES-128-CBC
* or AES-128-GCM
*/
ICryptoSessionKeyProvider INSTANCE_RANDOM_AES_128 = () -> {
try
Expand All @@ -54,7 +62,8 @@ public interface ICryptoSessionKeyProvider
ICryptoSessionKeyProvider INSTANCE_RANDOM_AES_128_GCM = INSTANCE_RANDOM_AES_128;

/**
* Session key provider for AES-256 keys that can be used e.g. for AES-256-CBC or AES-256-GCM
* Session key provider for AES-256 keys that can be used e.g. for AES-256-CBC
* or AES-256-GCM
*/
ICryptoSessionKeyProvider INSTANCE_RANDOM_AES_256 = () -> {
try
Expand All @@ -70,5 +79,4 @@ public interface ICryptoSessionKeyProvider

@Deprecated (forRemoval = true, since = "3.0.2")
ICryptoSessionKeyProvider INSTANCE_RANDOM_AES_256_GCM = INSTANCE_RANDOM_AES_256;

}

0 comments on commit a8a7da0

Please sign in to comment.