← Back to Kairo Docs|API Reference (Dokka)

ProtectedString

class ProtectedString(val value: String)

Secrets should never show up in logs or stack traces. Protected strings are a lightweight wrapper around sensitive strings that improves safety without complicating your code.

This is not cryptographic memory protection. The underlying string remains in JVM heap memory and is not zeroed after use.

Constructors

Link copied to clipboard
constructor(value: String)

Types

Link copied to clipboard

You must opt in to create protected strings or access their values.

Properties

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
Link copied to clipboard
open override fun toString(): String

Safe by default: toString redacts the value.