Class DOMSignatureMethod.AbstractP1363FormatSignatureMethod

  • All Implemented Interfaces:
    javax.xml.crypto.AlgorithmMethod, javax.xml.crypto.dsig.SignatureMethod, javax.xml.crypto.XMLStructure
    Direct Known Subclasses:
    DOMSignatureMethod.AbstractDSASignatureMethod, DOMSignatureMethod.AbstractECDSASignatureMethod
    Enclosing class:
    DOMSignatureMethod

    abstract static class DOMSignatureMethod.AbstractP1363FormatSignatureMethod
    extends DOMSignatureMethod
    Abstract class to support signature algorithms that sign and verify signatures in the IEEE P1363 format. The P1363 format is the concatenation of r and s in DSA and ECDSA signatures, and thus, only DSA and ECDSA signature methods should extend this class. Subclasses must supply a fallback algorithm to be used when the provider does not offer signature algorithms that use the P1363 format.
    • Field Detail

      • asn1

        boolean asn1
    • Constructor Detail

      • AbstractP1363FormatSignatureMethod

        AbstractP1363FormatSignatureMethod​(java.security.spec.AlgorithmParameterSpec params)
                                    throws java.security.InvalidAlgorithmParameterException
        Throws:
        java.security.InvalidAlgorithmParameterException
      • AbstractP1363FormatSignatureMethod

        AbstractP1363FormatSignatureMethod​(org.w3c.dom.Element dmElem)
                                    throws javax.xml.crypto.MarshalException
        Throws:
        javax.xml.crypto.MarshalException
    • Method Detail

      • getJCAFallbackAlgorithm

        abstract java.lang.String getJCAFallbackAlgorithm()
        Return the fallback algorithm to be used when the provider does not support signatures in the IEEE P1363 format. This algorithm should return signatures in the DER-encoded ASN.1 format.
      • getSignature

        java.security.Signature getSignature​(java.security.Provider p)
                                      throws java.security.NoSuchAlgorithmException
        Description copied from class: DOMSignatureMethod
        Returns an instance of Signature from the specified Provider. The algorithm is specified by the getJCAAlgorithm() method.
        Overrides:
        getSignature in class DOMSignatureMethod
        Parameters:
        p - the Provider to use
        Returns:
        an instance of Signature implementing the algorithm specified by getJCAAlgorithm()
        Throws:
        java.security.NoSuchAlgorithmException - if the Provider does not support the signature algorithm