Files

59 lines
1.4 KiB
Go
Raw Permalink Normal View History

package configuration
import (
"fmt"
"os"
)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const (
// BUILD DATA
BuildProject = "syscrypt "
BuildVersion = "1.2.1"
BuildDate = "20260222-183358"
BuildSource = "https://www.github.com/mintsalad/syscrypt"
// JSON
ConfigPath = "/opt/syscrypt/config.json"
// KEYS
MasterExt = ".d"
MasterKey = ".masterkey.d"
MasterPublicKey = ".masterkey.pub.d"
MasterKeySalt = ".register.d"
MasterAPIKey = ".master.api.d"
Dictionary = ".library.d"
DictionaryTmp = ".library.tmp.txt"
StatePath = ".ratelimit"
LockPath = ".lockout"
// LOCKOUT SETTINGS
MaxTokens = 5
RefillSeconds = 2
MaxFailures = 3
LockoutMinutes = 15
)
var KeyFolder string
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
func init() {
if _, err := os.Stat(ConfigPath); os.IsNotExist(err) {
fmt.Printf("config file is missing at %s\n", ConfigPath)
}
//KeyFolder = utils.ReadJSON(".config.keys.Path", ConfigPath)
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//func ReadJson(path string, filePath string) (string, error) {