Package org.bouncycastle.crypto.util
Class AlgorithmIdentifierFactory
java.lang.Object
org.bouncycastle.crypto.util.AlgorithmIdentifierFactory
Factory methods for common AlgorithmIdentifiers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic AlgorithmIdentifier
generateEncryptionAlgID
(ASN1ObjectIdentifier encryptionOID, int keySize, SecureRandom random) Create an AlgorithmIdentifier for the passed in encryption algorithm.
-
Method Details
-
generateEncryptionAlgID
public static AlgorithmIdentifier generateEncryptionAlgID(ASN1ObjectIdentifier encryptionOID, int keySize, SecureRandom random) throws IllegalArgumentException Create an AlgorithmIdentifier for the passed in encryption algorithm.- Parameters:
encryptionOID
- OID for the encryption algorithmkeySize
- key size in bits (-1 if unknown)random
- SecureRandom to use for parameter generation.- Returns:
- a full AlgorithmIdentifier including parameters
- Throws:
IllegalArgumentException
- if encryptionOID cannot be matched
-