Class DSAPrivateKeyInfoKeyPairConverter
java.lang.Object
net.schmizz.sshj.userauth.keyprovider.pkcs.DSAPrivateKeyInfoKeyPairConverter
- All Implemented Interfaces:
KeyPairConverter<org.bouncycastle.asn1.pkcs.PrivateKeyInfo>
class DSAPrivateKeyInfoKeyPairConverter
extends Object
implements KeyPairConverter<org.bouncycastle.asn1.pkcs.PrivateKeyInfo>
Key Pair Converter from DSA Private Key Information to PEM Key Pair
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.bouncycastle.crypto.params.DSAParameters
getDsaParameters
(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier) private org.bouncycastle.asn1.ASN1Integer
getEncodedPublicKey
(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privateKeyInfo) Get ASN.1 Encoded Public Key calculated according to RFC 6979 Section 2.2org.bouncycastle.openssl.PEMKeyPair
getKeyPair
(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privateKeyInfo) Get PEM Key Pair calculating DSA Public Key from DSA Private Key Information
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
P_INDEX
private static final int P_INDEX- See Also:
-
Q_INDEX
private static final int Q_INDEX- See Also:
-
G_INDEX
private static final int G_INDEX- See Also:
-
-
Constructor Details
-
DSAPrivateKeyInfoKeyPairConverter
DSAPrivateKeyInfoKeyPairConverter()
-
-
Method Details
-
getKeyPair
public org.bouncycastle.openssl.PEMKeyPair getKeyPair(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privateKeyInfo) throws IOException Get PEM Key Pair calculating DSA Public Key from DSA Private Key Information- Specified by:
getKeyPair
in interfaceKeyPairConverter<org.bouncycastle.asn1.pkcs.PrivateKeyInfo>
- Parameters:
privateKeyInfo
- DSA Private Key Information- Returns:
- PEM Key Pair
- Throws:
IOException
- Thrown on Public Key parsing failures
-
getEncodedPublicKey
private org.bouncycastle.asn1.ASN1Integer getEncodedPublicKey(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privateKeyInfo) throws IOException Get ASN.1 Encoded Public Key calculated according to RFC 6979 Section 2.2- Parameters:
privateKeyInfo
- DSA Private Key Information- Returns:
- ASN.1 Encoded DSA Public Key
- Throws:
IOException
- Thrown on failures parsing private key
-
getDsaParameters
private org.bouncycastle.crypto.params.DSAParameters getDsaParameters(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier)
-