public class McElieceKeyFactorySpi
extends java.security.KeyFactorySpi
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OID
The OID of the algorithm.
|
Constructor and Description |
---|
McElieceKeyFactorySpi() |
Modifier and Type | Method and Description |
---|---|
protected java.security.PrivateKey |
engineGeneratePrivate(java.security.spec.KeySpec keySpec) |
protected java.security.PublicKey |
engineGeneratePublic(java.security.spec.KeySpec keySpec) |
protected java.security.spec.KeySpec |
engineGetKeySpec(java.security.Key key,
java.lang.Class tClass) |
protected java.security.Key |
engineTranslateKey(java.security.Key key) |
java.security.PrivateKey |
generatePrivate(java.security.spec.KeySpec keySpec)
Converts, if possible, a key specification into a
BCMcEliecePrivateKey . |
java.security.PrivateKey |
generatePrivate(PrivateKeyInfo pki) |
java.security.PublicKey |
generatePublic(java.security.spec.KeySpec keySpec)
Converts, if possible, a key specification into a
BCMcEliecePublicKey . |
java.security.PublicKey |
generatePublic(SubjectPublicKeyInfo pki) |
java.security.spec.KeySpec |
getKeySpec(java.security.Key key,
java.lang.Class keySpec)
Converts, if possible, a given key into a key specification.
|
java.security.Key |
translateKey(java.security.Key key)
Translates a key into a form known by the FlexiProvider.
|
public static final java.lang.String OID
public java.security.PublicKey generatePublic(java.security.spec.KeySpec keySpec) throws java.security.spec.InvalidKeySpecException
BCMcEliecePublicKey
. Currently, the following key specifications
are supported: McEliecePublicKeySpec
, X509EncodedKeySpec
.keySpec
- the key specificationjava.security.spec.InvalidKeySpecException
- if the key specification is not supported.public java.security.PrivateKey generatePrivate(java.security.spec.KeySpec keySpec) throws java.security.spec.InvalidKeySpecException
BCMcEliecePrivateKey
. Currently, the following key specifications
are supported: McEliecePrivateKeySpec
,
PKCS8EncodedKeySpec
.keySpec
- the key specificationjava.security.spec.InvalidKeySpecException
- if the KeySpec is not supported.public java.security.spec.KeySpec getKeySpec(java.security.Key key, java.lang.Class keySpec) throws java.security.spec.InvalidKeySpecException
X509EncodedKeySpec
,
McEliecePublicKeySpec
PKCS8EncodedKeySpec
,
McEliecePrivateKeySpec
key
- the keykeySpec
- the key specificationjava.security.spec.InvalidKeySpecException
- if the key type or the key specification is not
supported.BCMcEliecePrivateKey
,
McEliecePrivateKeySpec
,
BCMcEliecePublicKey
,
McEliecePublicKeySpec
public java.security.Key translateKey(java.security.Key key) throws java.security.InvalidKeyException
BCMcEliecePrivateKey
,
BCMcEliecePublicKey
.key
- the keyjava.security.InvalidKeyException
- if the key type is not supported.public java.security.PublicKey generatePublic(SubjectPublicKeyInfo pki) throws java.security.spec.InvalidKeySpecException
java.security.spec.InvalidKeySpecException
public java.security.PrivateKey generatePrivate(PrivateKeyInfo pki) throws java.security.spec.InvalidKeySpecException
java.security.spec.InvalidKeySpecException
protected java.security.PublicKey engineGeneratePublic(java.security.spec.KeySpec keySpec) throws java.security.spec.InvalidKeySpecException
engineGeneratePublic
in class java.security.KeyFactorySpi
java.security.spec.InvalidKeySpecException
protected java.security.PrivateKey engineGeneratePrivate(java.security.spec.KeySpec keySpec) throws java.security.spec.InvalidKeySpecException
engineGeneratePrivate
in class java.security.KeyFactorySpi
java.security.spec.InvalidKeySpecException
protected java.security.spec.KeySpec engineGetKeySpec(java.security.Key key, java.lang.Class tClass) throws java.security.spec.InvalidKeySpecException
engineGetKeySpec
in class java.security.KeyFactorySpi
java.security.spec.InvalidKeySpecException
protected java.security.Key engineTranslateKey(java.security.Key key) throws java.security.InvalidKeyException
engineTranslateKey
in class java.security.KeyFactorySpi
java.security.InvalidKeyException