AuditEventEntity

data class AuditEventEntity(val id: String, val ts: Long, val name: String, val fieldsJson: String, val prevHash: String, val hash: String, val signature: String? = null, val deviceAttestationBlob: ByteArray? = null, val chainGeneration: Int = 1, val userId: String? = null)

Room entity for persistent audit events.

Each event is part of a hash chain, where hash includes the prevHash to create a tamper-evident log structure.

Constructors

Link copied to clipboard
constructor(id: String, ts: Long, name: String, fieldsJson: String, prevHash: String, hash: String, signature: String? = null, deviceAttestationBlob: ByteArray? = null, chainGeneration: Int = 1, userId: String? = null)

Properties

Link copied to clipboard

Chain generation number (increments on restart if file-based).

Link copied to clipboard

Optional attestation certificate chain.

Link copied to clipboard

JSON-serialized map of event fields.

Link copied to clipboard

SHA-256 hash of this event (includes prevHash).

Link copied to clipboard
val id: String

Unique event identifier (UUID).

Link copied to clipboard

Event name (e.g., "sdk_initialized", "event_enqueued").

Link copied to clipboard

Hash of the previous event in the chain.

Link copied to clipboard

Optional ECDSA signature from device attestation key.

Link copied to clipboard
val ts: Long

Event timestamp in milliseconds since epoch.

Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int