Package org.bouncycastle.mail.smime.test
Class CMSTestUtil
java.lang.Object
org.bouncycastle.mail.smime.test.CMSTestUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic KeyGeneratorstatic KeyGeneratorstatic KeyGeneratorstatic final booleanstatic KeyGeneratorstatic KeyGeneratorstatic KeyPairGeneratorstatic KeyPairGeneratorstatic KeyPairGeneratorstatic KeyPairGeneratorstatic KeyPairGeneratorstatic SecureRandomstatic KeyGeneratorstatic KeyGeneratorstatic KeyGeneratorstatic KeyGeneratorstatic BigInteger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdumpBase64(byte[] data) static org.bouncycastle.cert.X509AttributeCertificateHolderstatic SecretKeystatic SecretKeymakeAESKey(int keySize) static X509CertificatemakeCACertificate(KeyPair _subKP, String _subDN, KeyPair _issKP, String _issDN) static SecretKeymakeCamelliaKey(int keySize) static X509CertificatemakeCertificate(KeyPair _subKP, String _subDN, KeyPair _issKP, String _issDN) static X509CertificatemakeCertificate(KeyPair subKP, String _subDN, KeyPair issKP, String _issDN, boolean _ca) static X509CertificatemakeCertificate(KeyPair subKP, String _subDN, KeyPair issKP, String _issDN, org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAlgID) static X509CRLstatic SecretKeystatic SecretKeystatic KeyPairstatic KeyPairstatic KeyPairstatic KeyPairstatic KeyPairstatic X509CertificatemakeOaepCertificate(KeyPair _subKP, String _subDN, KeyPair _issKP, String _issDN) static X509CertificatemakeOaepCertificate(KeyPair subKP, String _subDN, KeyPair issKP, String _issDN, boolean _ca) static SecretKeystatic SecretKeystatic SecretKeystatic SecretKeystatic X509CertificatemakeV1Certificate(KeyPair subKP, String _subDN, KeyPair issKP, String _issDN) static byte[]
-
Field Details
-
rand
-
kpg
-
gostKpg
-
dsaKpg
-
ecGostKpg
-
ecDsaKpg
-
aes192kg
-
desede128kg
-
desede192kg
-
rc240kg
-
rc264kg
-
rc2128kg
-
aesKg
-
seedKg
-
camelliaKg
-
serialNumber
-
DEBUG
public static final boolean DEBUG- See Also:
-
-
Constructor Details
-
CMSTestUtil
public CMSTestUtil()
-
-
Method Details
-
dumpBase64
-
getAttributeCertificate
public static org.bouncycastle.cert.X509AttributeCertificateHolder getAttributeCertificate() throws Exception- Throws:
Exception
-
makeKeyPair
-
makeGostKeyPair
-
makeDsaKeyPair
-
makeEcDsaKeyPair
-
makeEcGostKeyPair
-
makeDesede128Key
-
makeAES192Key
-
makeDesede192Key
-
makeRC240Key
-
makeRC264Key
-
makeRC2128Key
-
makeSEEDKey
-
makeAESKey
-
makeCamelliaKey
-
makeCertificate
public static X509Certificate makeCertificate(KeyPair _subKP, String _subDN, KeyPair _issKP, String _issDN) throws GeneralSecurityException, IOException, org.bouncycastle.operator.OperatorCreationException - Throws:
GeneralSecurityExceptionIOExceptionorg.bouncycastle.operator.OperatorCreationException
-
makeOaepCertificate
public static X509Certificate makeOaepCertificate(KeyPair _subKP, String _subDN, KeyPair _issKP, String _issDN) throws GeneralSecurityException, IOException, org.bouncycastle.operator.OperatorCreationException - Throws:
GeneralSecurityExceptionIOExceptionorg.bouncycastle.operator.OperatorCreationException
-
makeCACertificate
public static X509Certificate makeCACertificate(KeyPair _subKP, String _subDN, KeyPair _issKP, String _issDN) throws GeneralSecurityException, IOException, org.bouncycastle.operator.OperatorCreationException - Throws:
GeneralSecurityExceptionIOExceptionorg.bouncycastle.operator.OperatorCreationException
-
makeV1Certificate
public static X509Certificate makeV1Certificate(KeyPair subKP, String _subDN, KeyPair issKP, String _issDN) throws GeneralSecurityException, IOException, org.bouncycastle.operator.OperatorCreationException - Throws:
GeneralSecurityExceptionIOExceptionorg.bouncycastle.operator.OperatorCreationException
-
makeCertificate
public static X509Certificate makeCertificate(KeyPair subKP, String _subDN, KeyPair issKP, String _issDN, boolean _ca) throws GeneralSecurityException, IOException, org.bouncycastle.operator.OperatorCreationException - Throws:
GeneralSecurityExceptionIOExceptionorg.bouncycastle.operator.OperatorCreationException
-
makeCertificate
public static X509Certificate makeCertificate(KeyPair subKP, String _subDN, KeyPair issKP, String _issDN, org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAlgID) throws GeneralSecurityException, IOException, org.bouncycastle.operator.OperatorCreationException - Throws:
GeneralSecurityExceptionIOExceptionorg.bouncycastle.operator.OperatorCreationException
-
makeOaepCertificate
public static X509Certificate makeOaepCertificate(KeyPair subKP, String _subDN, KeyPair issKP, String _issDN, boolean _ca) throws GeneralSecurityException, IOException, org.bouncycastle.operator.OperatorCreationException - Throws:
GeneralSecurityExceptionIOExceptionorg.bouncycastle.operator.OperatorCreationException
-
makeCrl
- Throws:
Exception
-
streamToByteArray
- Throws:
IOException
-