Class NOPSigningHandler

  • All Implemented Interfaces:
    SigningHandler

    @Deprecated
    public class NOPSigningHandler
    extends Object
    implements SigningHandler
    Deprecated.
    This algorithm is inherently insecure and shouldn't be used.
    An implementation of the SigningHandler which does not perform any signing or verifying.
    • Constructor Detail

      • NOPSigningHandler

        public NOPSigningHandler()
        Deprecated.
    • Method Detail

      • sign

        public byte[] sign​(JwsAlgorithm algorithm,
                           String data)
        Deprecated.
        Simply returns a byte array of a UTF-8 empty string.
        Specified by:
        sign in interface SigningHandler
        Parameters:
        algorithm - The JwsAlgorithm defining the Java Cryptographic algorithm.
        data - The data to be signed.
        Returns:
        A byte array of the signature.
      • sign

        public byte[] sign​(JwsAlgorithm algorithm,
                           byte[] data)
        Deprecated.
        Returns an empty byte array.
        Specified by:
        sign in interface SigningHandler
        Parameters:
        algorithm - the JWS signature algorithm to use.
        data - the raw data to sign.
        Returns:
        the signature.
      • verify

        public boolean verify​(JwsAlgorithm algorithm,
                              byte[] data,
                              byte[] signature)
        Deprecated.
        Verifies that the signature length is zero.
        Specified by:
        verify in interface SigningHandler
        Parameters:
        algorithm - The JwsAlgorithm defining the JavaCryptographic algorithm.
        data - The data that was signed.
        signature - The signature of the data.
        Returns:
        true if the signature is a valid signature of the data.