org.bouncycastle.cms.test

Class CMSTestUtil


public class CMSTestUtil
extends java.lang.Object

Field Summary

static boolean
DEBUG
static KeyGenerator
aes192kg
static KeyGenerator
aesKg
static KeyGenerator
camelliaKg
static KeyGenerator
desede128kg
static KeyGenerator
desede192kg
static KeyPairGenerator
dsaKpg
static KeyPairGenerator
ecDsaKpg
static KeyPairGenerator
ecGostKpg
static KeyPairGenerator
gostKpg
static KeyPairGenerator
kpg
static SecureRandom
rand
static KeyGenerator
rc2128kg
static KeyGenerator
rc240kg
static KeyGenerator
rc264kg
static KeyGenerator
seedKg
static BigInteger
serialNumber

Method Summary

static String
dumpBase64(byte[] data)
static X509AttributeCertificate
getAttributeCertificate()
static SecretKey
makeAES192Key()
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 X509CRL
makeCrl(KeyPair pair)
static SecretKey
makeDesede128Key()
static SecretKey
makeDesede192Key()
static KeyPair
makeDsaKeyPair()
static KeyPair
makeEcDsaKeyPair()
static KeyPair
makeEcGostKeyPair()
static KeyPair
makeGostKeyPair()
static KeyPair
makeKeyPair()
static SecretKey
makeRC2128Key()
static SecretKey
makeRC240Key()
static SecretKey
makeRC264Key()
static SecretKey
makeSEEDKey()
static byte[]
streamToByteArray(InputStream in)

Field Details

DEBUG

public static final boolean DEBUG
Field Value:
true

aes192kg

public static KeyGenerator aes192kg

aesKg

public static KeyGenerator aesKg

camelliaKg

public static KeyGenerator camelliaKg

desede128kg

public static KeyGenerator desede128kg

desede192kg

public static KeyGenerator desede192kg

dsaKpg

public static KeyPairGenerator dsaKpg

ecDsaKpg

public static KeyPairGenerator ecDsaKpg

ecGostKpg

public static KeyPairGenerator ecGostKpg

gostKpg

public static KeyPairGenerator gostKpg

kpg

public static KeyPairGenerator kpg

rand

public static SecureRandom rand

rc2128kg

public static KeyGenerator rc2128kg

rc240kg

public static KeyGenerator rc240kg

rc264kg

public static KeyGenerator rc264kg

seedKg

public static KeyGenerator seedKg

serialNumber

public static BigInteger serialNumber

Method Details

dumpBase64

public static String dumpBase64(byte[] data)

getAttributeCertificate

public static X509AttributeCertificate getAttributeCertificate()
            throws Exception

makeAES192Key

public static SecretKey makeAES192Key()

makeAESKey

public static SecretKey makeAESKey(int keySize)

makeCACertificate

public static X509Certificate makeCACertificate(KeyPair _subKP,
                                                String _subDN,
                                                KeyPair _issKP,
                                                String _issDN)
            throws GeneralSecurityException,
                   IOException

makeCamelliaKey

public static SecretKey makeCamelliaKey(int keySize)

makeCertificate

public static X509Certificate makeCertificate(KeyPair _subKP,
                                              String _subDN,
                                              KeyPair _issKP,
                                              String _issDN)
            throws GeneralSecurityException,
                   IOException

makeCertificate

public static X509Certificate makeCertificate(KeyPair subKP,
                                              String _subDN,
                                              KeyPair issKP,
                                              String _issDN,
                                              boolean _ca)
            throws GeneralSecurityException,
                   IOException

makeCrl

public static X509CRL makeCrl(KeyPair pair)
            throws Exception

makeDesede128Key

public static SecretKey makeDesede128Key()

makeDesede192Key

public static SecretKey makeDesede192Key()

makeDsaKeyPair

public static KeyPair makeDsaKeyPair()

makeEcDsaKeyPair

public static KeyPair makeEcDsaKeyPair()

makeEcGostKeyPair

public static KeyPair makeEcGostKeyPair()

makeGostKeyPair

public static KeyPair makeGostKeyPair()

makeKeyPair

public static KeyPair makeKeyPair()

makeRC2128Key

public static SecretKey makeRC2128Key()

makeRC240Key

public static SecretKey makeRC240Key()

makeRC264Key

public static SecretKey makeRC264Key()

makeSEEDKey

public static SecretKey makeSEEDKey()

streamToByteArray

public static byte[] streamToByteArray(InputStream in)
            throws IOException