Bouncy Castle Cryptography Library 1.48

org.bouncycastle.openpgp.operator.jcajce
Class JcePBESecretKeyEncryptorBuilder

java.lang.Object
  extended by org.bouncycastle.openpgp.operator.jcajce.JcePBESecretKeyEncryptorBuilder

public class JcePBESecretKeyEncryptorBuilder
extends java.lang.Object


Constructor Summary
JcePBESecretKeyEncryptorBuilder(int encAlgorithm)
           
JcePBESecretKeyEncryptorBuilder(int encAlgorithm, int s2kCount)
          Create an SecretKeyEncryptorBuilder with the S2K count different to the default of 0x60.
JcePBESecretKeyEncryptorBuilder(int encAlgorithm, PGPDigestCalculator s2kDigestCalculator)
           
JcePBESecretKeyEncryptorBuilder(int encAlgorithm, PGPDigestCalculator s2kDigestCalculator, int s2kCount)
          Create an SecretKeyEncryptorBuilder with the S2k count different to the default of 0x60, and the S2K digest different from SHA-1.
 
Method Summary
 PBESecretKeyEncryptor build(char[] passPhrase)
           
 JcePBESecretKeyEncryptorBuilder setProvider(java.security.Provider provider)
           
 JcePBESecretKeyEncryptorBuilder setProvider(java.lang.String providerName)
           
 JcePBESecretKeyEncryptorBuilder setSecureRandom(java.security.SecureRandom random)
          Provide a user defined source of randomness.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JcePBESecretKeyEncryptorBuilder

public JcePBESecretKeyEncryptorBuilder(int encAlgorithm)

JcePBESecretKeyEncryptorBuilder

public JcePBESecretKeyEncryptorBuilder(int encAlgorithm,
                                       int s2kCount)
Create an SecretKeyEncryptorBuilder with the S2K count different to the default of 0x60.

Parameters:
encAlgorithm - encryption algorithm to use.
s2kCount - iteration count to use for S2K function.

JcePBESecretKeyEncryptorBuilder

public JcePBESecretKeyEncryptorBuilder(int encAlgorithm,
                                       PGPDigestCalculator s2kDigestCalculator)

JcePBESecretKeyEncryptorBuilder

public JcePBESecretKeyEncryptorBuilder(int encAlgorithm,
                                       PGPDigestCalculator s2kDigestCalculator,
                                       int s2kCount)
Create an SecretKeyEncryptorBuilder with the S2k count different to the default of 0x60, and the S2K digest different from SHA-1.

Parameters:
encAlgorithm - encryption algorithm to use.
s2kDigestCalculator - digest calculator to use.
s2kCount - iteration count to use for S2K function.
Method Detail

setProvider

public JcePBESecretKeyEncryptorBuilder setProvider(java.security.Provider provider)

setProvider

public JcePBESecretKeyEncryptorBuilder setProvider(java.lang.String providerName)

setSecureRandom

public JcePBESecretKeyEncryptorBuilder setSecureRandom(java.security.SecureRandom random)
Provide a user defined source of randomness.

Parameters:
random - the secure random to be used.
Returns:
the current builder.

build

public PBESecretKeyEncryptor build(char[] passPhrase)

Bouncy Castle Cryptography Library 1.48