diff --git a/pgpainless-core/src/main/java/org/pgpainless/provider/BouncyCastleProviderFactory.java b/pgpainless-core/src/main/java/org/pgpainless/provider/BouncyCastleProviderFactory.java index ace5edbe..7169238a 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/provider/BouncyCastleProviderFactory.java +++ b/pgpainless-core/src/main/java/org/pgpainless/provider/BouncyCastleProviderFactory.java @@ -8,6 +8,9 @@ import java.security.Provider; import org.bouncycastle.jce.provider.BouncyCastleProvider; +/** + * Implementation of {@link ProviderFactory} using a {@link BouncyCastleProvider}. + */ public final class BouncyCastleProviderFactory extends ProviderFactory { private static final Provider provider = new BouncyCastleProvider(); diff --git a/pgpainless-core/src/main/java/org/pgpainless/provider/ProviderFactory.java b/pgpainless-core/src/main/java/org/pgpainless/provider/ProviderFactory.java index 4af67c60..5942b0d5 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/provider/ProviderFactory.java +++ b/pgpainless-core/src/main/java/org/pgpainless/provider/ProviderFactory.java @@ -6,6 +6,14 @@ package org.pgpainless.provider; import java.security.Provider; +/** + * Allow the use of different {@link Provider} implementations to provide cryptographic primitives by setting + * a {@link ProviderFactory} singleton. + * By default, the class is initialized with a {@link BouncyCastleProviderFactory}. + *
+ * To make use of your own custom {@link Provider}, call {@link #setFactory(ProviderFactory)}, passing your + * own custom {@link ProviderFactory} instance. + */ public abstract class ProviderFactory { private static ProviderFactory FACTORY;