Interface KeyPairGeneratorFactory

All Known Implementing Classes:
AbstractKeyPairGeneratorFactory, EcKeyPairGeneratorFactory, RsaKeyPairGeneratorFactory

public interface KeyPairGeneratorFactory
Intarface for a factory for creating a KeyPairGenerator suitable for a specific key type.
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Method Details

    • getKeyPairGenerator

      KeyPairGenerator getKeyPairGenerator(Provider provider) throws NoSuchAlgorithmException, KeyException
      Creates a key pair generator.
      Parameters:
      provider - the crypto provider used to create the key pair generator
      Returns:
      a KeyPairGenerator
      Throws:
      NoSuchAlgorithmException - the key type served by this factory instance is not supported by the specified provider
      KeyException - error initiating the key pair generator
    • supports

      boolean supports(String keyType)
      Predicate telling whether this factory instance supports a particular key type (see KeyGenType).
      Parameters:
      keyType - the requested key type name
      Returns:
      true if this factory instance supports the specified key type and false otherwise