Function zng_wgt_text::obscure_txt

source ·
pub fn obscure_txt(
    child: impl UiNode,
    enabled: impl IntoVar<bool>,
) -> impl UiNode
Expand description

P If the typed text is obscured in render.

When enabled each text character is replaced with obscuring_char, cut, copy and undo commands are disabled.

Note that the text variable is still plain text in memory, a memory dump while the widget is filled can leak the password, this is a potential security problem shared by apps that accept typed passwords. To mitigate the problem don’t use automatic crash reports with memory dump, drop the widget and the text variable as soon as possible, design the app to show the password widget last to minimize its lifetime.