Class AlgorithmIdentifierFactory


  • public class AlgorithmIdentifierFactory
    extends java.lang.Object
    Factory methods for common AlgorithmIdentifiers.
    • Method Detail

      • generateEncryptionAlgID

        public static AlgorithmIdentifier generateEncryptionAlgID​(ASN1ObjectIdentifier encryptionOID,
                                                                  int keySize,
                                                                  java.security.SecureRandom random)
                                                           throws java.lang.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:
        java.lang.IllegalArgumentException - if encryptionOID cannot be matched