001package com.nimbusds.jose; 002 003 004import com.nimbusds.jose.util.Base64URL; 005 006 007/** 008 * JSON Web Signature (JWS) signer. 009 * 010 * @author Vladimir Dzhuvinov 011 * @version 2015-04-21 012 */ 013public interface JWSSigner extends JWSProvider { 014 015 016 /** 017 * Signs the specified {@link JWSObject#getSigningInput input} of a 018 * {@link JWSObject JWS object}. 019 * 020 * @param header The JSON Web Signature (JWS) header. Must 021 * specify a supported JWS algorithm and must not 022 * be {@code null}. 023 * @param signingInput The input to sign. Must not be {@code null}. 024 * 025 * @return The resulting signature part (third part) of the JWS object. 026 * 027 * @throws JOSEException If the JWS algorithm is not supported, if a 028 * critical header parameter is not supported or 029 * marked for deferral to the application, or if 030 * signing failed for some other internal reason. 031 */ 032 Base64URL sign(final JWSHeader header, final byte[] signingInput) 033 throws JOSEException; 034}