mirror of
https://github.com/absmach/magistrala.git
synced 2026-06-23 04:10:28 +00:00
6011cad546
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
16 lines
424 B
Go
16 lines
424 B
Go
// Copyright (c) Abstract Machines
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package users
|
|
|
|
// Hasher specifies an API for generating hashes of an arbitrary textual
|
|
// content.
|
|
type Hasher interface {
|
|
// Hash generates the hashed string from plain-text.
|
|
Hash(string) (string, error)
|
|
|
|
// Compare compares plain-text version to the hashed one. An error should
|
|
// indicate failed comparison.
|
|
Compare(string, string) error
|
|
}
|