Documentation ¶
Index ¶
- func BootstrapUserKey(userKeyPath, userKeyDirectory string) error
- func CalculateSHA256Hash(key string) string
- func CalculateSHA256HashInBytes(key string) [32]byte
- func GenerateUserKey() string
- func GenerateUserKeyFromString(msg string) string
- func GetUserHash(userKeyPath string) string
- func GetUserKey(userKeyPath string) string
- func VerifyUserKeyFile(pathToFile string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BootstrapUserKey ¶
Ensures a validated UserKey exists
func CalculateSHA256HashInBytes ¶
similar to CalculateSHA256Hash, but does not convert byte array to string we noticed unwanted type conversions when, converting back to []byte from string created another for simplicity and to avoid unnecessary complications
func GenerateUserKeyFromString ¶
the fn hashes the supplied string first and uses first 16 bytes of the generated hash to be converted to UUID. As each bit of SHA hash is effectively random, we get a unique-uuid for each distinct string, even when they have minimal differences
func GetUserHash ¶
Gets the user key and returns the calculated hash for it
func VerifyUserKeyFile ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.