INNER CODE UNIT · Go
getParamsHash
pilinux/gorest · config/config.go:939
func getParamsHash() (params lib.HashPassConfig, err error) {
hashPassMemory64, errThis := strconv.ParseUint((strings.TrimSpace(os.Getenv("HASHPASSMEMORY"))), 10, 32)
if errThis != nil {
err = errThis
return
}
// HashPass multiplies Memory by 1024 (MiB -> KiB); guard against uint32 overflow.
if hashPassMemory64 > math.MaxUint32/1024 {
err = errors.New("HASHPASSMEMORY too large: must be <= " + strconv.FormatUint(math.MaxUint32/1024, 10))
return
}
hashPassIterations64, errThis := strconv.ParseUint((strings.TrimSpace(os.Getenv("HASHPASSITERATIONS"))), 10, 32)
if errThis != nil {
err = errThis
return
}
hashPassParallelism64, errThis := strconv.ParseUint((strings.TrimSpace(os.Getenv("HASHPASSPARALLELISM"))), 10, 8)
if errThis != nil {