Documentation
¶
Overview ¶
Package hash implements the functions, types, and interfaces for the module.
Package hash implements the functions, types, and interfaces for the module.
Package hash implements the functions, types, and interfaces for the module.
Package hash provides the hash functions ¶
Package hash implements the functions, types, and interfaces for the module.
Index ¶
- Constants
- func Generate(password string) (string, error)
- func GenerateWithSalt(password, salt string) (string, error)
- func RegisterAlgorithm(t types.Type, creator AlgorithmCreator, defaultConfig AlgorithmConfig)
- func UseCrypto(t types.Type, opts ...types.Option) error
- func Verify(hashed, password string) error
- type AlgorithmConfig
- type AlgorithmCreator
- type Crypto
Constants ¶
View Source
const ( // ENV environment variable name ENV = "ORIGADMIN_HASH_TYPE" // ErrPasswordNotMatch error when password not match ErrPasswordNotMatch = errors.String("password not match") )
Variables ¶
This section is empty.
Functions ¶
func GenerateWithSalt ¶
func RegisterAlgorithm ¶
func RegisterAlgorithm(t types.Type, creator AlgorithmCreator, defaultConfig AlgorithmConfig)
RegisterAlgorithm registers a new hash algorithm
Types ¶
type AlgorithmConfig ¶
type AlgorithmCreator ¶
type AlgorithmCreator func(*types.Config) (interfaces.Cryptographic, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
algorithms
|
|
|
hmac
Package hmac implements the functions, types, and interfaces for the module.
|
Package hmac implements the functions, types, and interfaces for the module. |
|
Package core implements the functions, types, and interfaces for the module.
|
Package core implements the functions, types, and interfaces for the module. |
|
examples
|
|
|
hash
command
Package main provides an example of using the hash package
|
Package main provides an example of using the hash package |
Click to show internal directories.
Click to hide internal directories.