Add some requesters
This commit is contained in:
@@ -17,6 +17,13 @@ type Config struct {
|
||||
Maxheaderbytes int `json:"max_header_bytes"`
|
||||
} `json:"advanced"`
|
||||
} `json:"server"`
|
||||
Password struct {
|
||||
Memory uint32 `json:"memory"`
|
||||
Iterations uint32 `json:"iterations"`
|
||||
Parallelism uint8 `json:"parallelism"`
|
||||
SaltLength uint32 `json:"salt_length"`
|
||||
KeyLength uint32 `json:"key_length"`
|
||||
} `json:"password"`
|
||||
Database struct {
|
||||
Driver string `json:"driver"`
|
||||
Host string `json:"host"`
|
||||
@@ -28,16 +35,20 @@ type Config struct {
|
||||
} `json:"database"`
|
||||
}
|
||||
|
||||
// ErrorPageData Data model for error page template
|
||||
type ErrorPageData struct {
|
||||
StatusCode int
|
||||
Title string
|
||||
Message string
|
||||
// Argon2Params defines the parameters for Argon2id (adjustable based on server performance)
|
||||
type Argon2Params struct {
|
||||
Memory uint32 // Memory usage (KiB), recommended 64*1024 = 64MB
|
||||
Iterations uint32 // Time cost, recommended 1-3
|
||||
Parallelism uint8 // Number of parallel threads, recommended 2-4
|
||||
SaltLength uint32 // Salt length, recommended 16 bytes
|
||||
KeyLength uint32 // Output hash length, recommended 32 bytes
|
||||
}
|
||||
|
||||
// IndexPageData Data model for index page template
|
||||
type IndexPageData struct {
|
||||
StatusCode int
|
||||
Title string
|
||||
I18n string
|
||||
// hashParts Used to parse stored hash strings
|
||||
type HashParts struct {
|
||||
Memory uint32
|
||||
Iterations uint32
|
||||
Parallelism uint8
|
||||
SaltBase64 string
|
||||
HashBase64 string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user