Class DSAPrivateKeyInfoKeyPairConverter

  • All Implemented Interfaces:
    KeyPairConverter<org.bouncycastle.asn1.pkcs.PrivateKeyInfo>

    class DSAPrivateKeyInfoKeyPairConverter
    extends java.lang.Object
    implements KeyPairConverter<org.bouncycastle.asn1.pkcs.PrivateKeyInfo>
    Key Pair Converter from DSA Private Key Information to PEM Key Pair
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static int G_INDEX  
      private static org.slf4j.Logger logger  
      private static int P_INDEX  
      private static int Q_INDEX  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private 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.2
      org.bouncycastle.openssl.PEMKeyPair getKeyPair​(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privateKeyInfo)
      Get PEM Key Pair calculating DSA Public Key from DSA Private Key Information
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DSAPrivateKeyInfoKeyPairConverter

        DSAPrivateKeyInfoKeyPairConverter()
    • Method Detail

      • getKeyPair

        public org.bouncycastle.openssl.PEMKeyPair getKeyPair​(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privateKeyInfo)
                                                       throws java.io.IOException
        Get PEM Key Pair calculating DSA Public Key from DSA Private Key Information
        Specified by:
        getKeyPair in interface KeyPairConverter<org.bouncycastle.asn1.pkcs.PrivateKeyInfo>
        Parameters:
        privateKeyInfo - DSA Private Key Information
        Returns:
        PEM Key Pair
        Throws:
        java.io.IOException - Thrown on Public Key parsing failures
      • getEncodedPublicKey

        private org.bouncycastle.asn1.ASN1Integer getEncodedPublicKey​(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privateKeyInfo)
                                                               throws java.io.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:
        java.io.IOException - Thrown on failures parsing private key
      • getDsaParameters

        private org.bouncycastle.crypto.params.DSAParameters getDsaParameters​(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier)