mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-07-29 12:29:40 +00:00
10 lines
339 B
Go
10 lines
339 B
Go
package hash
|
|
|
|
// Hasher is a generic interface for hashing algorithms
|
|
type Hasher interface {
|
|
// CreateHash will return a hashed version of the secretKey, or an error
|
|
CreateHash(secretKey string) (string, error)
|
|
// VerifyHash will compare a secretKey and a hash, and return nil if they match
|
|
VerifyHash(hash, secretKey string) error
|
|
}
|