Package org.bouncycastle.openssl.jcajce
Class JceOpenSSLPKCS8EncryptorBuilder
- java.lang.Object
-
- org.bouncycastle.openssl.jcajce.JceOpenSSLPKCS8EncryptorBuilder
-
public class JceOpenSSLPKCS8EncryptorBuilder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
AES_128_CBC
static java.lang.String
AES_192_CBC
static java.lang.String
AES_256_CBC
static java.lang.String
DES3_CBC
static java.lang.String
PBE_SHA1_2DES
static java.lang.String
PBE_SHA1_3DES
static java.lang.String
PBE_SHA1_RC2_128
static java.lang.String
PBE_SHA1_RC2_40
static java.lang.String
PBE_SHA1_RC4_128
static java.lang.String
PBE_SHA1_RC4_40
-
Constructor Summary
Constructors Constructor Description JceOpenSSLPKCS8EncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OutputEncryptor
build()
JceOpenSSLPKCS8EncryptorBuilder
setIterationCount(int iterationCount)
JceOpenSSLPKCS8EncryptorBuilder
setPasssword(char[] password)
JceOpenSSLPKCS8EncryptorBuilder
setPRF(org.bouncycastle.asn1.x509.AlgorithmIdentifier prf)
Set the PRF to use for key generation.JceOpenSSLPKCS8EncryptorBuilder
setProvider(java.lang.String providerName)
JceOpenSSLPKCS8EncryptorBuilder
setProvider(java.security.Provider provider)
JceOpenSSLPKCS8EncryptorBuilder
setRandom(java.security.SecureRandom random)
-
-
-
Field Detail
-
AES_128_CBC
public static final java.lang.String AES_128_CBC
-
AES_192_CBC
public static final java.lang.String AES_192_CBC
-
AES_256_CBC
public static final java.lang.String AES_256_CBC
-
DES3_CBC
public static final java.lang.String DES3_CBC
-
PBE_SHA1_RC4_128
public static final java.lang.String PBE_SHA1_RC4_128
-
PBE_SHA1_RC4_40
public static final java.lang.String PBE_SHA1_RC4_40
-
PBE_SHA1_3DES
public static final java.lang.String PBE_SHA1_3DES
-
PBE_SHA1_2DES
public static final java.lang.String PBE_SHA1_2DES
-
PBE_SHA1_RC2_128
public static final java.lang.String PBE_SHA1_RC2_128
-
PBE_SHA1_RC2_40
public static final java.lang.String PBE_SHA1_RC2_40
-
-
Method Detail
-
setRandom
public JceOpenSSLPKCS8EncryptorBuilder setRandom(java.security.SecureRandom random)
-
setPasssword
public JceOpenSSLPKCS8EncryptorBuilder setPasssword(char[] password)
-
setPRF
public JceOpenSSLPKCS8EncryptorBuilder setPRF(org.bouncycastle.asn1.x509.AlgorithmIdentifier prf)
Set the PRF to use for key generation. By default this is HmacSHA1.- Parameters:
prf
- algorithm id for PRF.- Returns:
- the current builder.
-
setIterationCount
public JceOpenSSLPKCS8EncryptorBuilder setIterationCount(int iterationCount)
-
setProvider
public JceOpenSSLPKCS8EncryptorBuilder setProvider(java.lang.String providerName)
-
setProvider
public JceOpenSSLPKCS8EncryptorBuilder setProvider(java.security.Provider provider)
-
build
public OutputEncryptor build() throws OperatorCreationException
- Throws:
OperatorCreationException
-
-