Class DOMSignatureMethod.AbstractECDSASignatureMethod

    • Constructor Detail

      • AbstractECDSASignatureMethod

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

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

      • postSignFormat

        byte[] postSignFormat​(java.security.Key key,
                              byte[] sig)
                       throws java.io.IOException
        Description copied from class: DOMSignatureMethod
        Returns the signature bytes with any additional formatting necessary for the signature algorithm used. For RSA signatures, no changes are required, and this method should simply return back sig. For DSA and ECDSA, this method should return the signature in the IEEE P1363 format, the concatenation of r and s.
        Specified by:
        postSignFormat in class DOMSignatureMethod
        Parameters:
        key - the key used to sign
        sig - the signature returned by Signature.sign()
        Returns:
        the formatted signature
        Throws:
        java.io.IOException
      • preVerifyFormat

        byte[] preVerifyFormat​(java.security.Key key,
                               byte[] sig)
                        throws java.io.IOException
        Description copied from class: DOMSignatureMethod
        Returns the signature bytes with any conversions that are necessary before the signature can be verified. For RSA signatures, no changes are required, and this method should simply return back sig. For DSA and ECDSA, this method should return the signature in the DER-encoded ASN.1 format.
        Specified by:
        preVerifyFormat in class DOMSignatureMethod
        Parameters:
        key - the key used to sign
        sig - the signature
        Returns:
        the formatted signature
        Throws:
        java.io.IOException