public class McElieceKeyFactorySpi extends KeyFactorySpi
BCMcEliecePrivateKey
,
BCMcEliecePublicKey
Modifier and Type | Field and Description |
---|---|
static String |
OID
The OID of the algorithm.
|
Constructor and Description |
---|
McElieceKeyFactorySpi() |
Modifier and Type | Method and Description |
---|---|
protected PrivateKey |
engineGeneratePrivate(KeySpec keySpec)
Converts, if possible, a key specification into a
BCMcEliecePrivateKey . |
protected PublicKey |
engineGeneratePublic(KeySpec keySpec)
Converts, if possible, a key specification into a
BCMcEliecePublicKey . |
protected KeySpec |
engineGetKeySpec(Key key,
Class tClass) |
protected Key |
engineTranslateKey(Key key) |
PrivateKey |
generatePrivate(org.bouncycastle.asn1.pkcs.PrivateKeyInfo pki) |
PublicKey |
generatePublic(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo pki) |
KeySpec |
getKeySpec(Key key,
Class keySpec)
Converts, if possible, a given key into a key specification.
|
Key |
translateKey(Key key)
Translates a key into a form known by the FlexiProvider.
|
public static final String OID
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException
BCMcEliecePublicKey
. X509EncodedKeySpec
.engineGeneratePublic
in class KeyFactorySpi
keySpec
- the key specificationInvalidKeySpecException
- if the key specification is not supported.protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException
BCMcEliecePrivateKey
.engineGeneratePrivate
in class KeyFactorySpi
keySpec
- the key specificationInvalidKeySpecException
- if the KeySpec is not supported.public KeySpec getKeySpec(Key key, Class keySpec) throws InvalidKeySpecException
key
- the keykeySpec
- the key specificationInvalidKeySpecException
- if the key type or the key specification is not
supported.BCMcEliecePrivateKey
,
BCMcEliecePublicKey
public Key translateKey(Key key) throws InvalidKeyException
BCMcEliecePrivateKey
,
BCMcEliecePublicKey
.key
- the keyInvalidKeyException
- if the key type is not supported.public PublicKey generatePublic(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo pki) throws InvalidKeySpecException
InvalidKeySpecException
public PrivateKey generatePrivate(org.bouncycastle.asn1.pkcs.PrivateKeyInfo pki) throws InvalidKeySpecException
InvalidKeySpecException
protected KeySpec engineGetKeySpec(Key key, Class tClass) throws InvalidKeySpecException
engineGetKeySpec
in class KeyFactorySpi
InvalidKeySpecException
protected Key engineTranslateKey(Key key) throws InvalidKeyException
engineTranslateKey
in class KeyFactorySpi
InvalidKeyException
Copyright © 2017 BouncyCastle.org. All rights reserved.