de.flexiprovider.pqc.pflash
Class PFlashKeyFactory
java.lang.Object
|
+--java.security.KeyFactorySpi
|
+--de.flexiprovider.api.keys.KeyFactory
|
+--de.flexiprovider.pqc.pflash.PFlashKeyFactory
- public class PFlashKeyFactory
- extends KeyFactory
This class is able to transform pFLASH keys and pFLASH key specifications
into a form that can be used with the FlexiPQCProvider.
- Author:
- Marian Hornschuch, Alexander Koller
- See Also:
- ,
,
,
,
|
Field Summary |
static java.lang.String |
OID
The OID of pFLASH |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OID
public static final java.lang.String OID
- The OID of pFLASH
PFlashKeyFactory
public PFlashKeyFactory()
generatePublic
public PublicKey generatePublic(KeySpec keySpec)
throws InvalidKeySpecException
- Converts, if possible, a key specification into a
PFlashPublicKey.
Currently, the following key specifications are supported:
PFlashPublicKeySpec.
- Overrides:
generatePublic in class KeyFactory
- Parameters:
keySpec - the key specification- Returns:
- the public pFLASH key
- Throws:
InvalidKeySpecException - if the KeySpec is not supported.- See Also:
- ,
generatePrivate
public PrivateKey generatePrivate(KeySpec keySpec)
throws InvalidKeySpecException
- Converts, if possible, a key specification into a
PFlashPrivateKey.
Currently, the following key specifications are supported:
PFlashPrivateKeySpec
- Overrides:
generatePrivate in class KeyFactory
- Parameters:
keySpec - the key specification- Returns:
- the private pFLASH key
- Throws:
InvalidKeySpecException - if the KeySpec is not supported.- See Also:
- ,
getKeySpec
public KeySpec getKeySpec(Key key,
java.lang.Class keySpec)
throws InvalidKeySpecException
- Converts, if possible, a given key into a key specification.
Currently, the following specifications are supported:
- for PFlashPublicKey: PFlashPublicKeySpec
- for PFlashPrivateKey: PFlashPrivateKeySpec
- Overrides:
getKeySpec in class KeyFactory
- Parameters:
key - the keykeySpec - the class of which type the returned class should be.- Returns:
- the specification of the pFLASH key
- Throws:
InvalidKeySpecException - if the key type or key specification is not supported.- See Also:
- ,
,
,
translateKey
public Key translateKey(Key key)
throws InvalidKeyException
- Translates a key into a form known by the FlexiProvider.
Currently the following "source" keys are supported:
PFlashPrivateKey, PFlashPublicKey.
- Overrides:
translateKey in class KeyFactory
- Parameters:
key - the key- Returns:
- a key of a known key type
- Throws:
InvalidKeyException - if the key type is not supported.