public class MLDSAKeyFactory extends KeyFactorySpi
KeyFactorySpi| Constructor and Description |
|---|
MLDSAKeyFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected PrivateKey |
engineGeneratePrivate(KeySpec keySpec)
Generates a private key from the given key spec.
|
protected PublicKey |
engineGeneratePublic(KeySpec keySpec)
Generates a public key from the given key spec.
|
protected <T extends KeySpec> |
engineGetKeySpec(Key key,
Class<T> keySpec)
Implementation of the engine method.
|
protected Key |
engineTranslateKey(Key key)
Translates the given key object of some unknown or untrusted provider into
a key object supported by this MLDSA key factory.
|
static Key |
translateKey(Key key)
Translates the given key object of some unknown or untrusted provider into
a key object supported by this MLDSA key factory.
|
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException
engineGeneratePublic in class KeyFactorySpikeySpec - the key material; it may either be MLDSAPublicKeySpec or
X509EncodedKeySpecInvalidKeySpecException - if the key spec is not supported or erroneousprotected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException
engineGeneratePrivate in class KeyFactorySpikeySpec - the key material; it may either be MLDSAPrivateKeySpec or
PKCS8EncodedKeySpecInvalidKeySpecException - if the key spec is not supported or erroneousprotected <T extends KeySpec> T engineGetKeySpec(Key key, Class<T> keySpec) throws InvalidKeySpecException
engineGetKeySpec in class KeyFactorySpikey - the key to be converted (either MLDSAPrivateKey or
MLDSAPublicKey)keySpec - the key specification type. If the given key is of type
MLDSAPrivateKey the keySpec may be MLDSAPrivateKeySpec or
PKCS8EncodedKeySpec.
Otherwise (key is of type
MLDSAPublicKey) the keySpec must be
MLDSAPublicKeySpec or X509EncodedKeySpecInvalidKeySpecException - if the key cannot be transformed into the provided keySpec.protected Key engineTranslateKey(Key key) throws InvalidKeyException
engineTranslateKey in class KeyFactorySpikey - the key to be translatedInvalidKeyException - if the given key cannot be translatedpublic static Key translateKey(Key key) throws InvalidKeyException
key - the key to be translatedInvalidKeyException - if the given key cannot be translatedCopyright © 2020–2025 Stiftung SIC. All rights reserved.