انتقل إلى المحتوى الرئيسي

Function: open()

open(key, field, sealed): OpenedField

Defined in: packages/persistence/src/personal/fields.ts:99

Reverses seal. An erased subject is a value, not an error: a read returns the subject with its personal fields absent.

Parameters​

key​

SubjectKey | ErasedSubjectKey

A resolved key, or the erased marker SubjectKeys.get returned.

field​

PersonalField

The table and column the value was read from.

sealed​

SealedField

The key_id and _ct column as stored.

Returns​

OpenedField

The plaintext, or { erased: true } once the key is destroyed, with the cache warm or cold.

Throws​

undecryptable when the value was moved to another subject, column or key id, or altered; invalid_field.