Bouncy Castle Cryptography Library 1.79

org.bouncycastle.openpgp.operator.jcajce
Class JcaPGPDigestCalculatorProviderBuilder

java.lang.Object
  |
  +--org.bouncycastle.openpgp.operator.jcajce.JcaPGPDigestCalculatorProviderBuilder

public class JcaPGPDigestCalculatorProviderBuilder
extends java.lang.Object

A builder for PGPDigestCalculatorProvider instances that obtain cryptographic primitives using the JCA API.

By default digest calculator providers obtained from this builder will use the default JCA algorithm lookup mechanisms (i.e. specifying no provider), but a specific provider can be specified prior to building.


Constructor Summary
JcaPGPDigestCalculatorProviderBuilder()
          Default constructor.
 
Method Summary
 PGPDigestCalculatorProvider build()
          Constructs a new PGPDigestCalculatorProvider
 JcaPGPDigestCalculatorProviderBuilder setProvider(java.security.Provider provider)
          Sets the provider to use to obtain cryptographic primitives.
 JcaPGPDigestCalculatorProviderBuilder setProvider(java.lang.String providerName)
          Sets the provider to use to obtain cryptographic primitives.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JcaPGPDigestCalculatorProviderBuilder

public JcaPGPDigestCalculatorProviderBuilder()
Default constructor.
Method Detail

setProvider

public JcaPGPDigestCalculatorProviderBuilder setProvider(java.security.Provider provider)
Sets the provider to use to obtain cryptographic primitives.
Parameters:
provider - the JCA provider to use.
Returns:
the current builder.

setProvider

public JcaPGPDigestCalculatorProviderBuilder setProvider(java.lang.String providerName)
Sets the provider to use to obtain cryptographic primitives.
Parameters:
providerName - the name of the JCA provider to use.
Returns:
the current builder.

build

public PGPDigestCalculatorProvider build()
                                  throws PGPException
Constructs a new PGPDigestCalculatorProvider
Returns:
a PGPDigestCalculatorProvider that will use the JCA algorithm lookup strategy configured on this builder.
Throws:
PGPException - if an error occurs constructing the digest calculator provider.

Bouncy Castle Cryptography Library 1.79