Package org.bouncycastle.cms.test
Class CMSTestUtil
java.lang.Object
org.bouncycastle.cms.test.CMSTestUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic KeyGenerator
static KeyGenerator
static KeyGenerator
static final boolean
static KeyGenerator
static KeyGenerator
static KeyPairGenerator
static KeyPairGenerator
static KeyPairGenerator
static KeyPairGenerator
static KeyPairGenerator
static KeyPairGenerator
static KeyPairGenerator
static KeyPairGenerator
static SecureRandom
static KeyGenerator
static KeyGenerator
static KeyGenerator
static KeyGenerator
static BigInteger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
dumpBase64
(byte[] data) static boolean
static SecretKey
static SecretKey
makeAESKey
(int keySize) static X509Certificate
makeCACertificate
(KeyPair _subKP, String _subDN, KeyPair _issKP, String _issDN) static SecretKey
makeCamelliaKey
(int keySize) static X509Certificate
makeCertificate
(KeyPair _subKP, String _subDN, KeyPair _issKP, String _issDN) static X509Certificate
makeCertificate
(KeyPair subKP, String _subDN, KeyPair issKP, String _issDN, boolean _ca) static X509Certificate
makeCertificate
(KeyPair subKP, String _subDN, KeyPair issKP, String _issDN, org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAlgID) static X509CRL
static SecretKey
static SecretKey
static KeyPair
static KeyPair
static KeyPair
static KeyPair
static KeyPair
static KeyPair
static KeyPair
static KeyPair
static X509Certificate
makeOaepCertificate
(KeyPair _subKP, String _subDN, KeyPair _issKP, String _issDN) static X509Certificate
makeOaepCertificate
(KeyPair subKP, String _subDN, KeyPair issKP, String _issDN, boolean _ca) static SecretKey
static SecretKey
static SecretKey
static SecretKey
static X509Certificate
makeV1Certificate
(KeyPair subKP, String _subDN, KeyPair issKP, String _issDN) static byte[]
-
Field Details
-
rand
-
kpg
-
gostKpg
-
dsaKpg
-
dhKpg
-
ecGostKpg
-
ecDsaKpg
-
ed25519Kpg
-
ed448Kpg
-
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
-
isAeadAvailable
public static boolean isAeadAvailable() -
dumpBase64
-
getAttributeCertificate
- Throws:
Exception
-
makeKeyPair
-
makeGostKeyPair
-
makeDsaKeyPair
-
makeEd25519KeyPair
-
makeEd448KeyPair
-
makeEcDsaKeyPair
-
makeDhKeyPair
-
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, OperatorCreationException -
makeOaepCertificate
public static X509Certificate makeOaepCertificate(KeyPair _subKP, String _subDN, KeyPair _issKP, String _issDN) throws GeneralSecurityException, IOException, OperatorCreationException -
makeCACertificate
public static X509Certificate makeCACertificate(KeyPair _subKP, String _subDN, KeyPair _issKP, String _issDN) throws GeneralSecurityException, IOException, OperatorCreationException -
makeV1Certificate
public static X509Certificate makeV1Certificate(KeyPair subKP, String _subDN, KeyPair issKP, String _issDN) throws GeneralSecurityException, IOException, OperatorCreationException -
makeCertificate
public static X509Certificate makeCertificate(KeyPair subKP, String _subDN, KeyPair issKP, String _issDN, boolean _ca) throws GeneralSecurityException, IOException, OperatorCreationException -
makeCertificate
public static X509Certificate makeCertificate(KeyPair subKP, String _subDN, KeyPair issKP, String _issDN, org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAlgID) throws GeneralSecurityException, IOException, OperatorCreationException -
makeOaepCertificate
public static X509Certificate makeOaepCertificate(KeyPair subKP, String _subDN, KeyPair issKP, String _issDN, boolean _ca) throws GeneralSecurityException, IOException, OperatorCreationException -
makeCrl
- Throws:
Exception
-
streamToByteArray
- Throws:
IOException
-