public class JcaPGPKeyConverter extends PGPKeyConverter
| Constructor and Description |
|---|
JcaPGPKeyConverter() |
| Modifier and Type | Method and Description |
|---|---|
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
getMLDSAOid(int algorithm)
Return the object identifier of the ML-DSA parameter set of an RFC 9980 ML-DSA + EdDSA composite algorithm.
|
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
getMLKEMOid(int algorithm)
Return the object identifier of the ML-KEM parameter set of an RFC 9980 ML-KEM + ECDH composite algorithm.
|
PGPPrivateKey |
getPGPPrivateKey(PGPPublicKey pub,
java.security.PrivateKey privKey)
Convert a PrivateKey into a PGPPrivateKey.
|
PGPPublicKey |
getPGPPublicKey(int version,
int algorithm,
PGPAlgorithmParameters algorithmParameters,
java.security.PublicKey pubKey,
java.util.Date time)
Create a PGPPublicKey from the passed in JCA one.
|
PGPPublicKey |
getPGPPublicKey(int version,
int algorithm,
java.security.PublicKey pubKey,
java.util.Date time)
Create a PGPPublicKey from the passed in JCA one.
|
PGPPublicKey |
getPGPPublicKey(int algorithm,
PGPAlgorithmParameters algorithmParameters,
java.security.PublicKey pubKey,
java.util.Date time)
Deprecated.
use versioned
getPGPPublicKey(int, int, PGPAlgorithmParameters, PublicKey, Date) instead. |
PGPPublicKey |
getPGPPublicKey(int algorithm,
java.security.PublicKey pubKey,
java.util.Date time)
Deprecated.
use versioned
getPGPPublicKey(int, int, PublicKey, Date) instead. |
java.security.PrivateKey |
getPrivateKey(PGPPrivateKey privKey) |
java.security.PublicKey |
getPublicKey(PGPPublicKey publicKey) |
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
getSLHDSAOid(int algorithm)
Return the object identifier of the SLH-DSA parameter set of an RFC 9980 SLH-DSA algorithm.
|
JcaPGPKeyConverter |
setProvider(java.security.Provider provider) |
JcaPGPKeyConverter |
setProvider(java.lang.String providerName) |
getPrivateKeyInfo, getPrivateKeyInfo, implGetKdfParameterspublic JcaPGPKeyConverter setProvider(java.security.Provider provider)
public JcaPGPKeyConverter setProvider(java.lang.String providerName)
public PGPPrivateKey getPGPPrivateKey(PGPPublicKey pub, java.security.PrivateKey privKey) throws PGPException
pub - the corresponding PGPPublicKey to privKey.privKey - the private key for the key in pub.PGPException@Deprecated public PGPPublicKey getPGPPublicKey(int algorithm, PGPAlgorithmParameters algorithmParameters, java.security.PublicKey pubKey, java.util.Date time) throws PGPException
getPGPPublicKey(int, int, PGPAlgorithmParameters, PublicKey, Date) instead.Note: the time passed in affects the value of the key's keyID, so you probably only want to do this once for a JCA key, or make sure you keep track of the time you used.
algorithm - asymmetric algorithm type representing the public key.algorithmParameters - additional parameters to be stored against the public key.pubKey - actual public key to associate.time - date of creation.PGPException - on key creation problem.public PGPPublicKey getPGPPublicKey(int version, int algorithm, PGPAlgorithmParameters algorithmParameters, java.security.PublicKey pubKey, java.util.Date time) throws PGPException
Note: the time passed in affects the value of the key's keyID, so you probably only want to do this once for a JCA key, or make sure you keep track of the time you used.
version - key version.algorithm - asymmetric algorithm type representing the public key.algorithmParameters - additional parameters to be stored against the public key.pubKey - actual public key to associate.time - date of creation.PGPException - on key creation problem.@Deprecated public PGPPublicKey getPGPPublicKey(int algorithm, java.security.PublicKey pubKey, java.util.Date time) throws PGPException
getPGPPublicKey(int, int, PublicKey, Date) instead.Note: the time passed in affects the value of the key's keyID, so you probably only want to do this once for a JCA key, or make sure you keep track of the time you used.
algorithm - asymmetric algorithm type representing the public key.pubKey - actual public key to associate.time - date of creation.PGPException - on key creation problem.public PGPPublicKey getPGPPublicKey(int version, int algorithm, java.security.PublicKey pubKey, java.util.Date time) throws PGPException
Note: the time passed in affects the value of the key's keyID, so you probably only want to do this once for a JCA key, or make sure you keep track of the time you used.
version - key version.algorithm - asymmetric algorithm type representing the public key.pubKey - actual public key to associate.time - date of creation.PGPException - on key creation problem.public java.security.PrivateKey getPrivateKey(PGPPrivateKey privKey) throws PGPException
PGPExceptionpublic java.security.PublicKey getPublicKey(PGPPublicKey publicKey) throws PGPException
PGPExceptionpublic static org.bouncycastle.asn1.ASN1ObjectIdentifier getMLDSAOid(int algorithm)
algorithm - PublicKeyAlgorithmTags.MLDSA65_Ed25519 or PublicKeyAlgorithmTags.MLDSA87_Ed448public static org.bouncycastle.asn1.ASN1ObjectIdentifier getSLHDSAOid(int algorithm)
algorithm - one of the SLH-DSA code pointspublic static org.bouncycastle.asn1.ASN1ObjectIdentifier getMLKEMOid(int algorithm)
algorithm - PublicKeyAlgorithmTags.MLKEM768_X25519 or PublicKeyAlgorithmTags.MLKEM1024_X448