write

open suspend override fun write(path: Path, content: String)(source)

Encrypts and writes content securely. This operation ensures:

  • Content is never stored in plaintext

  • Atomic write of encrypted data

  • Secure handling of encryption errors

  • Directory creation if needed

Parameters

path

Target file for encrypted content

content

Plaintext to encrypt and store

Throws

if encryption fails

IOException

if write fails