HardwareAcceleratedDetector

class HardwareAcceleratedDetector(fallback: PiiDetector, modelHash: String? = null, mlTimeoutMs: Long = 200) : PiiDetector

Optional NNAPI-backed PII detector wrapper.

Wraps a PiiDetector with hardware acceleration. NNAPI is present on all supported devices (minSdk 33 > 27). Falls back to fallback if NNAPI is unavailable or model integrity checks fail.

Security:

  • Model integrity: SHA-256 hash verification before loading (NIST SI-7).

  • Sandboxed execution: model cannot access network or filesystem.

  • FedRAMP AC-4/SC-7: no data transmission, local-only inference.

This is an OPTIONAL companion artifact (kiosk-ops-sdk-ml), not part of core SDK. The core SDK ships RegexPiiDetector as the default.

Since

0.5.0

Constructors

Link copied to clipboard
constructor(fallback: PiiDetector, modelHash: String? = null, mlTimeoutMs: Long = 200)

Functions

Link copied to clipboard
open override fun scan(payloadJson: String): PiiScanResult

Scan a JSON payload for PII.