Selkies

SecretText

Session clipboard text its owner marked secret (CLIPBOARD_SECRET_HINTS).

The mark rides with the text to the clients, which keep it out of sight and take it back off the local clipboard as far as the browser lets them (lib/clipboard-sync.js), and back onto the session's clipboard when this server writes the text there again. The text alone is carried: markup or a picture beside it would leave the secret where the mark cannot follow. An empty one tells the clients that the session's clipboard no longer holds the secret sent before it. Its repr shows neither the text nor its length, so a log line that prints one with %r, or a container holding one, keeps it out of sight as well; str(), formatting, and comparison stay a str's, since every transport sends the text itself.

Attributes

attribute__slots__
= ()

Functions

func__repr__() -> str
Source Code
def __repr__(self) -> str:
    return "SecretText(<hidden>)" if self else "SecretText('')"

Returns

str