Class AlgorithmIdentifierFactory

java.lang.Object
org.bouncycastle.crypto.util.AlgorithmIdentifierFactory

public class AlgorithmIdentifierFactory extends Object
Factory methods for common AlgorithmIdentifiers.
  • 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 algorithm
      keySize - 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