initial commit

This commit is contained in:
2024-08-17 10:26:02 -05:00
commit 7711fc14ed
17 changed files with 975 additions and 0 deletions

28
models/models.go Normal file
View File

@@ -0,0 +1,28 @@
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
}