protected byte[] signWith(final byte[] value, final String algHeaderValue, final Key key) {
        val headers = new LinkedHashMap<>(commonHeaders);
        headers.putAll(getSigningOpHeaders());

        return JsonWebTokenSigner.builder()
            .key(key)
            .headers(headers)
            .algorithm(algHeaderValue)
            .build()
            .sign(value);
    }
Sign with byte [ ].

@param value          the value
@param algHeaderValue the alg header value
@param key            the key
@return the byte [ ]
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/cipher/AbstractCipherExecutor.java