public static byte @NotNull [] calculateHash(byte[] bytes, int offset, int length) {
    // Probably we don't need to hash the length and "\0000".
    MessageDigest digest = contentHashDigest();
    digest.update(String.valueOf(length).getBytes(UTF_8));
    digest.update("\u0000".getBytes(UTF_8));
    digest.update(bytes, offset, length);
    return digest.digest();
  }
public static byte @NotNull [] calculateHash(byte[] bytes, int offset, int length)