Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultLocation is the path in the view we store our key salt // if no other path is provided. DefaultLocation = "salt" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // Location is the path in the storage backend for the // salt. Uses DefaultLocation if not specified. Location string // HashFunc is the hashing function to use for salting. // Defaults to SHA1 if not provided. HashFunc HashFunc }
Config is used to parameterize the Salt
type Salt ¶
type Salt struct {
// contains filtered or unexported fields
}
Salt is used to manage a persistent salt key which is used to hash values. This allows keys to be generated and recovered using the global salt. Primarily, this allows paths in the storage backend to be obfuscated if they may contain sensitive information.
func (*Salt) DidGenerate ¶
DidGenerate returns if the underlying salt value was generated on initialization or if an existing salt value was loaded
Click to show internal directories.
Click to hide internal directories.