github.com/Finschia/finschia-sdk@v0.48.1/crypto/keyring/doc.go (about) 1 // Package keys provides common key management API. 2 // 3 // # The Keybase interface 4 // 5 // The Keybase interface defines the methods that a type needs to implement to be used 6 // as key storage backend. This package provides few implementations out-of-the-box. 7 // 8 // # NewLegacy 9 // 10 // The NewLegacy constructor returns an on-disk implementation backed by LevelDB storage that has been 11 // the default implementation used by the SDK until v0.38.0. Due to security concerns, it is 12 // recommended to drop it in favor of the NewKeyring constructor as it will be removed in future releases. 13 // 14 // # NewInMemory 15 // 16 // The NewInMemory constructor returns an implementation backed by an in-memory, goroutine-safe 17 // map that has historically been used for testing purposes or on-the-fly key generation as the 18 // generated keys are discarded when the process terminates or the type instance is garbage 19 // collected. 20 // 21 // # New 22 // 23 // The New constructor returns an implementation backed by a keyring library 24 // (https://github.com/99designs/keyring), whose aim is to provide a common abstraction and uniform 25 // interface between secret stores available for Windows, macOS, and most GNU/Linux distributions 26 // as well as operating system-agnostic encrypted file-based backends. 27 // 28 // The backends: 29 // 30 // os The instance returned by this constructor uses the operating system's default 31 // credentials store to handle keys storage operations securely. It should be noted 32 // that the keyring keyring may be kept unlocked for the whole duration of the user 33 // session. 34 // file This backend more closely resembles the previous keyring storage used prior to 35 // v0.38.1. It stores the keyring encrypted within the app's configuration directory. 36 // This keyring will request a password each time it is accessed, which may occur 37 // multiple times in a single command resulting in repeated password prompts. 38 // kwallet This backend uses KDE Wallet Manager as a credentials management application: 39 // https://github.com/KDE/kwallet 40 // pass This backend uses the pass command line utility to store and retrieve keys: 41 // https://www.passwordstore.org/ 42 // test This backend stores keys insecurely to disk. It does not prompt for a password to 43 // be unlocked and it should be use only for testing purposes. 44 // memory Same instance as returned by NewInMemory. This backend uses a transient storage. Keys 45 // are discarded when the process terminates or the type instance is garbage collected. 46 package keyring