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 Summary
Modifier and TypeMethodDescriptiongetKeyPairGenerator
(Provider provider) Creates a key pair generator.boolean
Predicate telling whether this factory instance supports a particular key type (seeKeyGenType
).
-
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 providerKeyException
- error initiating the key pair generator
-
supports
Predicate telling whether this factory instance supports a particular key type (seeKeyGenType
).- Parameters:
keyType
- the requested key type name- Returns:
- true if this factory instance supports the specified key type and false otherwise
-