mirror of
https://github.com/safing/portbase
synced 2025-09-04 03:29:59 +00:00
Fix crypto config
This commit is contained in:
parent
6cf262aae9
commit
ab05357b51
3 changed files with 32 additions and 32 deletions
|
@ -24,7 +24,7 @@ func init() {
|
||||||
DefaultValue: 256,
|
DefaultValue: 256,
|
||||||
ValidationRegex: "^[0-9]{3,5}$",
|
ValidationRegex: "^[0-9]{3,5}$",
|
||||||
})
|
})
|
||||||
minFeedEntropy = config.GetAsInt("random/min_feed_entropy", 256)
|
minFeedEntropy = config.Concurrent.GetAsInt("random/min_feed_entropy", 256)
|
||||||
}
|
}
|
||||||
|
|
||||||
// The Feeder is used to feed entropy to the RNG.
|
// The Feeder is used to feed entropy to the RNG.
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
fullFeedDuration = 1 * time.Millisecond
|
fullFeedDuration = 100 * time.Millisecond
|
||||||
)
|
)
|
||||||
|
|
||||||
func getFullFeedDuration() time.Duration {
|
func getFullFeedDuration() time.Duration {
|
||||||
|
|
|
@ -32,9 +32,9 @@ func init() {
|
||||||
ExpertiseLevel: config.ExpertiseLevelDeveloper,
|
ExpertiseLevel: config.ExpertiseLevelDeveloper,
|
||||||
OptType: config.OptTypeInt,
|
OptType: config.OptTypeInt,
|
||||||
DefaultValue: 360, // ten minutes
|
DefaultValue: 360, // ten minutes
|
||||||
ValidationRegex: "^[0-9]{2,5}$",
|
ValidationRegex: "^[1-9][0-9]{1,5}$",
|
||||||
})
|
})
|
||||||
reseedAfterSeconds = config.GetAsInt("random/reseed_after_seconds", 360)
|
reseedAfterSeconds = config.Concurrent.GetAsInt("random/reseed_after_seconds", 360)
|
||||||
|
|
||||||
config.Register(&config.Option{
|
config.Register(&config.Option{
|
||||||
Name: "Reseed after x bytes",
|
Name: "Reseed after x bytes",
|
||||||
|
@ -43,7 +43,7 @@ func init() {
|
||||||
ExpertiseLevel: config.ExpertiseLevelDeveloper,
|
ExpertiseLevel: config.ExpertiseLevelDeveloper,
|
||||||
OptType: config.OptTypeInt,
|
OptType: config.OptTypeInt,
|
||||||
DefaultValue: 1000000, // one megabyte
|
DefaultValue: 1000000, // one megabyte
|
||||||
ValidationRegex: "^[0-9]{0,9}$",
|
ValidationRegex: "^[1-9][0-9]{2,9}$",
|
||||||
})
|
})
|
||||||
reseedAfterBytes = config.GetAsInt("random/reseed_after_bytes", 1000000)
|
reseedAfterBytes = config.GetAsInt("random/reseed_after_bytes", 1000000)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue