Top Description Fields Constructors Methods
org.bouncycastle.crypto.util

public Class AlgorithmIdentifierFactory

extends Object
Class Inheritance
Imports
java.security.SecureRandom, org.bouncycastle.asn1.ASN1ObjectIdentifier, .DERNull, .DEROctetString, org.bouncycastle.internal.asn1.cms.CCMParameters, .GCMParameters, org.bouncycastle.asn1.kisa.KISAObjectIdentifiers, org.bouncycastle.asn1.misc.CAST5CBCParameters, org.bouncycastle.asn1.nist.NISTObjectIdentifiers, org.bouncycastle.asn1.ntt.NTTObjectIdentifiers, org.bouncycastle.asn1.oiw.OIWObjectIdentifiers, org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers, .RC2CBCParameter, org.bouncycastle.asn1.x509.AlgorithmIdentifier

Factory methods for common AlgorithmIdentifiers.

Field Summary

Modifier and TypeField and Description
pack-priv static final ASN1ObjectIdentifier
pack-priv static final ASN1ObjectIdentifier
private static final short[]

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static AlgorithmIdentifier

Returns:

a full AlgorithmIdentifier including parameters
generateEncryptionAlgID
(ASN1ObjectIdentifier
OID for the encryption algorithm
encryptionOID
,
int
key size in bits (-1 if unknown)
keySize
,
SecureRandom
SecureRandom to use for parameter generation.
random
)

Create an AlgorithmIdentifier for the passed in encryption algorithm.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CAST5_CBCback to summary
pack-priv static final ASN1ObjectIdentifier CAST5_CBC
IDEA_CBCback to summary
pack-priv static final ASN1ObjectIdentifier IDEA_CBC
rc2Tableback to summary
private static final short[] rc2Table

Constructor Detail

AlgorithmIdentifierFactoryback to summary
private AlgorithmIdentifierFactory()

Method Detail

generateEncryptionAlgIDback to summary
public static AlgorithmIdentifier generateEncryptionAlgID(ASN1ObjectIdentifier encryptionOID, int keySize, SecureRandom random) throws IllegalArgumentException

Create an AlgorithmIdentifier for the passed in encryption algorithm.

Parameters
encryptionOID:ASN1ObjectIdentifier

OID for the encryption algorithm

keySize:int

key size in bits (-1 if unknown)

random:SecureRandom

SecureRandom to use for parameter generation.

Returns:AlgorithmIdentifier

a full AlgorithmIdentifier including parameters

Exceptions
IllegalArgumentException:
if encryptionOID cannot be matched