public class PKCS8Generator
extends java.lang.Object
implements org.bouncycastle.util.io.pem.PemObjectGenerator
Modifier and Type | Field and Description |
---|---|
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
AES_128_CBC |
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
AES_192_CBC |
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
AES_256_CBC |
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
DES3_CBC |
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
PBE_SHA1_2DES |
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
PBE_SHA1_3DES |
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
PBE_SHA1_RC2_128 |
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
PBE_SHA1_RC2_40 |
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
PBE_SHA1_RC4_128 |
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
PBE_SHA1_RC4_40 |
Constructor and Description |
---|
PKCS8Generator(java.security.PrivateKey key)
Deprecated.
use JcaPKCS8Generator
|
PKCS8Generator(java.security.PrivateKey key,
org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm,
java.security.Provider provider)
Deprecated.
use JcaPKCS8Generator
|
PKCS8Generator(java.security.PrivateKey key,
org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm,
java.lang.String provider)
Deprecated.
use JcaPKCS8Generator
|
PKCS8Generator(org.bouncycastle.asn1.pkcs.PrivateKeyInfo key,
OutputEncryptor outputEncryptor)
Base constructor.
|
Modifier and Type | Method and Description |
---|---|
org.bouncycastle.util.io.pem.PemObject |
generate() |
PKCS8Generator |
setIterationCount(int iterationCount)
Deprecated.
ignored in the updated case.
|
PKCS8Generator |
setPassword(char[] password)
Deprecated.
ignored in the updated case.
|
PKCS8Generator |
setSecureRandom(java.security.SecureRandom random)
Deprecated.
ignored in the updated case.
|
public static final org.bouncycastle.asn1.ASN1ObjectIdentifier AES_128_CBC
public static final org.bouncycastle.asn1.ASN1ObjectIdentifier AES_192_CBC
public static final org.bouncycastle.asn1.ASN1ObjectIdentifier AES_256_CBC
public static final org.bouncycastle.asn1.ASN1ObjectIdentifier DES3_CBC
public static final org.bouncycastle.asn1.ASN1ObjectIdentifier PBE_SHA1_RC4_128
public static final org.bouncycastle.asn1.ASN1ObjectIdentifier PBE_SHA1_RC4_40
public static final org.bouncycastle.asn1.ASN1ObjectIdentifier PBE_SHA1_3DES
public static final org.bouncycastle.asn1.ASN1ObjectIdentifier PBE_SHA1_2DES
public static final org.bouncycastle.asn1.ASN1ObjectIdentifier PBE_SHA1_RC2_128
public static final org.bouncycastle.asn1.ASN1ObjectIdentifier PBE_SHA1_RC2_40
public PKCS8Generator(java.security.PrivateKey key)
key
- private key to be encoded.public PKCS8Generator(java.security.PrivateKey key, org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm, java.lang.String provider) throws java.security.NoSuchProviderException, java.security.NoSuchAlgorithmException
key
- private key to be encodedalgorithm
- encryption algorithm to useprovider
- name of provider to usejava.security.NoSuchProviderException
- if provider cannot be foundjava.security.NoSuchAlgorithmException
- if algorithm/mode cannot be foundpublic PKCS8Generator(java.security.PrivateKey key, org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm, java.security.Provider provider) throws java.security.NoSuchAlgorithmException
key
- private key to be encodedalgorithm
- encryption algorithm to useprovider
- provider to usejava.security.NoSuchAlgorithmException
- if algorithm/mode cannot be foundpublic PKCS8Generator(org.bouncycastle.asn1.pkcs.PrivateKeyInfo key, OutputEncryptor outputEncryptor)
public PKCS8Generator setSecureRandom(java.security.SecureRandom random)
public PKCS8Generator setPassword(char[] password)
public PKCS8Generator setIterationCount(int iterationCount)
public org.bouncycastle.util.io.pem.PemObject generate() throws org.bouncycastle.util.io.pem.PemGenerationException
generate
in interface org.bouncycastle.util.io.pem.PemObjectGenerator
org.bouncycastle.util.io.pem.PemGenerationException