id()
id() : string
The stable identifier recorded in a frame header.
Returns
string —A short lowercase token such as "xchacha20poly1305" or "none".
Stores frames unsealed, for a site that has turned encryption off.
Present so that the encryption setting is a choice of cipher rather than a branch at every call site, and so a frame header always records which cipher wrote it - including "none", which is what lets a store written with encryption off stay readable after it is turned on.
seal(string $plain, string $associated = '') : string
Seals a frame.
| string | $plain | The bytes to seal. An empty string seals to an empty string, so an absent payload never becomes a non-empty frame. |
| string | $associated | Additional authenticated data - bound to the ciphertext but not encrypted. Strata passes the frame's own digest, which is what makes a frame moved to a different key in the bucket fail to open rather than open as the wrong content. |
The sealed bytes, including whatever nonce and tag the implementation needs to open them.