Files
go-nkode/models/models.go
2024-08-17 10:26:02 -05:00

29 lines
509 B
Go

package models
type KeypadSize struct {
AttrsPerKey int
NumbOfKeys int
}
func (kp *KeypadSize) TotalAttrs() int {
return kp.AttrsPerKey * kp.NumbOfKeys
}
func (kp *KeypadSize) IsDispersable() bool {
return kp.AttrsPerKey <= kp.NumbOfKeys
}
type EncipheredNKode struct {
Code string
Mask string
}
type NKodePolicy struct {
MaxNkodeLen int
MinNkodeLen int
DistinctSets int
DistinctAttributes int
LockOut int
Expiration int // seconds, -1 no expiration
}