Expand description
§Bitwarden Sensitive Value
Provides the Sensitive<T>, SensitiveString wrapper types and aliases (MasterPassword, Pin)
used to mark values as secret and prevent accidental logging.
§NOT A PUBLIC API
Please note that this is currently NOT public API and other teams should not currently rely on this as there are no stability guarantees. There is currently no support for external usages!
Modules§
Structs§
- Sensitive
- A wrapper type that marks the inner value as secret. This is used to prevent accidental logging
of secrets by overriding the
DebugandDisplayimplementations to redact the value. This redaction can be bypassed by enabling thedangerous-crypto-debugfeature. - Sensitive
String - FFI-friendly concrete wrapper around a sensitive
String. This is the type exposed across the UniFFI / WASM boundary; bindings see it as an opaque tagged string.DebugandDisplaydelegate to the innerSensitive, so output is redacted unlessdangerous-crypto-debugis enabled.
Constants§
- UNIFFI_
META_ 🔒CONST_ NAMESPACE_ BITWARDEN_ SENSITIVE_ VALUE - Export namespace metadata.
Traits§
- Expose
Sensitive - A trait for types that can expose their inner secret value. This is implemented for
Sensitive<T>and can be implemented for other wrapper types as needed. Theexposeandexpose_ownedmethods are intentionally explicit and require justification in comments to prevent accidental misuse.
Type Aliases§
- Master
Password - A master password. Wrapped to prevent accidental logging.
- Pin
- A PIN. Wrapped to prevent accidental logging.
- Sensitive
Slice - A zero-copy view over a borrowed slice of secret bytes. Wrapping a
&[u8]borrows the underlying buffer instead of cloning it, so the wrapper is bound by the borrow’s lifetime'aand cannot outlive the data it points at.Debug/Displayare redacted via the innerSensitive.