sun.security.x509

Class AlgIdDSA

    • Constructor Detail

      • AlgIdDSA

        public AlgIdDSA()
        Default constructor. The OID and parameters must be deserialized before this algorithm ID is used.
      • AlgIdDSA

        public AlgIdDSA(byte[] encodedAlg)
                 throws java.io.IOException
        Construct an AlgIdDSA from an X.509 encoded byte array.
        Throws:
        java.io.IOException
      • AlgIdDSA

        public AlgIdDSA(byte[] p,
                byte[] q,
                byte[] g)
                 throws java.io.IOException
        Constructs a DSS/DSA Algorithm ID from unsigned integers that define the algorithm parameters. Those integers are encoded as big-endian byte arrays.
        Parameters:
        p - the DSS/DSA paramter "P"
        q - the DSS/DSA paramter "Q"
        g - the DSS/DSA paramter "G"
        Throws:
        java.io.IOException
      • AlgIdDSA

        public AlgIdDSA(java.math.BigInteger p,
                java.math.BigInteger q,
                java.math.BigInteger g)
        Constructs a DSS/DSA Algorithm ID from numeric parameters. If all three are null, then the parameters portion of the algorithm id is set to null. See note in header regarding use.
        Parameters:
        p - the DSS/DSA paramter "P"
        q - the DSS/DSA paramter "Q"
        g - the DSS/DSA paramter "G"
    • Method Detail

      • getP

        public java.math.BigInteger getP()
        Returns the DSS/DSA parameter "P"
        Specified by:
        getP in interface java.security.interfaces.DSAParams
      • getQ

        public java.math.BigInteger getQ()
        Returns the DSS/DSA parameter "Q"
        Specified by:
        getQ in interface java.security.interfaces.DSAParams
      • getG

        public java.math.BigInteger getG()
        Returns the DSS/DSA parameter "G"
        Specified by:
        getG in interface java.security.interfaces.DSAParams
      • getName

        public java.lang.String getName()
        Returns "DSA", indicating the Digital Signature Algorithm (DSA) as defined by the Digital Signature Standard (DSS), FIPS 186.
        Overrides:
        getName in class AlgorithmId
      • decodeParams

        protected void decodeParams()
                             throws java.io.IOException
        Parses algorithm parameters P, Q, and G. They're found in the "params" member, which never needs to be changed.
        Overrides:
        decodeParams in class AlgorithmId
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Description copied from class: AlgorithmId
        Returns a string describing the algorithm and its parameters.
        Overrides:
        toString in class AlgorithmId
      • paramsToString

        protected java.lang.String paramsToString()
        Description copied from class: AlgorithmId
        Provides a human-readable description of the algorithm parameters. This may be redefined by subclasses which parse those parameters.
        Overrides:
        paramsToString in class AlgorithmId

Copyright © 2020. All Rights Reserved.