code: public static byte[] bigIntegerToBytes(BigInteger value) {
          if (value == null)
              return null;
  
          byte[] data = value.toByteArray();
  
          if (data.length != 1 && data[0] == 0) {
              byte[] tmp = new byte[data.length - 1];
              System.arraycopy(data, 1, tmp, 0, tmp.length);
              data = tmp;
          }
          return data;
      }
docs: Omitting sign indication byte. <br>
  <br>
  Instead of
  {@link org.spongycastle.util.BigIntegers#asUnsignedByteArray(BigInteger)}
  <br>
  we use this custom method to avoid an empty array in case of BigInteger.ZERO
  
  @param value
  any big integer number. A <code>null</code>-value will return
  <code>null</code>
  @return A byte array without a leading zero byte if present in the signed
  encoding. BigInteger.ZERO will return an array with length 1 and
  byte-value 0.