Skip to content

Main content

Biosecurity Log Redaction Length Budget Tool

Replace explicitly selected nonoverlapping UTF-16 spans in an authorized benign record.

Loading tool…

Description

Replace ordered nonoverlapping text spans with a supplied replacement.

Biosecurity administration records training assertions, custody, access purposes, inventories and document handling. Local counts, time checks and permission predicates describe supplied metadata; they do not authenticate people or items, enforce access or establish actual protective conditions.

Replace ordered nonoverlapping text spans with a supplied replacement.

When to use this tool

Use Biosecurity Log Redaction Length Budget when checking the stated benign biosecurity record, inventory, support or authorization convention.

How to use the tool and how it works

  1. Enter text, starts, ends, replacement. Follow any array-alignment requirements below. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read redacted, removedCodeUnits, resultingCodeUnits. Use the output convention below.

Replace ordered nonoverlapping text spans with a supplied replacement. Require aligned whole starts/ends in UTF-16 bounds and start >= prior end; splice half-open spans, return redacted text, removedCodeUnits and resultingCodeUnits.1

Input fieldMeaning and unitsAccepted input
textTextRequired. Text; maximum UTF-16 length 8192.
startsZero-based UTF-16 code-unit starts of ordered nonoverlapping half-open spans.Required. Array of safe integer; maximum items 256.
endsExclusive UTF-16 code-unit ends; zero-length spans insert replacement text.Required. Array of safe integer; maximum items 256.
replacementReplacementRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
redactedRedactedRequired. Text; maximum UTF-16 length 8192.
removedCodeUnitsRemoved Code UnitsRequired. Safe integer.
resultingCodeUnitsResulting Code UnitsRequired. Safe integer.
json
{
  "input": {
    "text": "abcdefghi",
    "starts": [
      1,
      6
    ],
    "ends": [
      3,
      8
    ],
    "replacement": "*"
  },
  "output": {
    "redacted": "a*def*i",
    "removedCodeUnits": 4,
    "resultingCodeUnits": 7
  }
}

Limitations and assumptions

  • Code-unit boundaries can split surrogate pairs and zero-length spans insert replacements; this does not identify sensitive data or guarantee deidentification.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Verify actual records, permissions and conditions through the responsible organization's procedures; use qualified risk assessment and appropriate professional oversight for practical decisions.

References

  1. Calculation and input contract: biosecurity/biosecurity-log-redaction-length-budget — tool.io

Similar or alternative tools