Module tari_utilities::hidden

source ·
Expand description

Sometimes you need to handle sensitive data, like a passphrase or key material. There are pitfalls here that you want to avoid: the data should be zeroized when it goes out of scope, shouldn’t be displayed or output to debug logs, shouldn’t be unintentionally copied or moved, and often should have strict type differentiation to avoid it being misused in an unintended context. This library provides a generic type and macro that can help.

Structs

  • A generic type for data that needs to be kept hidden and zeroized when out of scope, and is accessible only by reference.