mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-18 02:12:06 +01:00
Document ProviderFactory
This commit is contained in:
parent
d3ae02f137
commit
126571a6cd
2 changed files with 11 additions and 0 deletions
|
@ -8,6 +8,9 @@ import java.security.Provider;
|
||||||
|
|
||||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of {@link ProviderFactory} using a {@link BouncyCastleProvider}.
|
||||||
|
*/
|
||||||
public final class BouncyCastleProviderFactory extends ProviderFactory {
|
public final class BouncyCastleProviderFactory extends ProviderFactory {
|
||||||
|
|
||||||
private static final Provider provider = new BouncyCastleProvider();
|
private static final Provider provider = new BouncyCastleProvider();
|
||||||
|
|
|
@ -6,6 +6,14 @@ package org.pgpainless.provider;
|
||||||
|
|
||||||
import java.security.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}.
|
||||||
|
* <br>
|
||||||
|
* To make use of your own custom {@link Provider}, call {@link #setFactory(ProviderFactory)}, passing your
|
||||||
|
* own custom {@link ProviderFactory} instance.
|
||||||
|
*/
|
||||||
public abstract class ProviderFactory {
|
public abstract class ProviderFactory {
|
||||||
|
|
||||||
private static ProviderFactory FACTORY;
|
private static ProviderFactory FACTORY;
|
||||||
|
|
Loading…
Reference in a new issue