public static SECPSignature create(
      final BigInteger r, final BigInteger s, final byte recId, final BigInteger curveOrder) {
    checkNotNull(r);
    checkNotNull(s);
    checkInBounds("r", r, curveOrder);
    checkInBounds("s", s, curveOrder);
    if (recId != 0 && recId != 1) {
      throw new IllegalArgumentException(
          "Invalid 'recId' value, should be 0 or 1 but got " + recId);
    }
    return new SECPSignature(r, s, recId);
  }
Creates a new signature object given its parameters.

@param r the 'r' part of the signature.
@param s the 's' part of the signature.
@param recId the recovery id part of the signature.
@param curveOrder The order (n) of the used curve
@return the created {@link SECPSignature} object.
@throws NullPointerException if {@code r} or {@code s} are {@code null}.
@throws IllegalArgumentException if any argument is invalid (for instance, {@code v} is neither
    27 or 28).
crypto/algorithms/src/main/java/org/hyperledger/besu/crypto/SECPSignature.java