interfaces

package
v0.2.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec interface {
	Encoder
	Decoder
}

Codec defines the interface for hash encoding and decoding operations

type ConfigValidator

type ConfigValidator interface {
	// Validate validates the configuration
	Validate(*types.Config) error
}

ConfigValidator defines the interface for configuration validation

type Cryptographic

type Cryptographic interface {
	// Hash generates a hash for the given password
	Hash(password string) (string, error)
	// HashWithSalt generates a hash for the given password with the specified salt
	HashWithSalt(password, salt string) (string, error)
	// Verify checks if the given hashed password matches the plaintext password
	Verify(hashed, password string) error
}

Cryptographic defines the interface for cryptographic operations

type Decoder

type Decoder interface {
	// Decode decodes a string into hash parts
	Decode(encoded string) (*types.HashParts, error)
}

Decoder defines the interface for hash decoding operations

type Encoder

type Encoder interface {
	// Encode encodes salt and hash into a string
	Encode(salt []byte, hash []byte, params ...string) string
}

Encoder defines the interface for hash encoding operations

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL