refactor user defined keypad
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
type User struct {
|
||||
Username m.Username
|
||||
EncipheredPasscode m.EncipheredNKode
|
||||
Kp m.KeypadDimension
|
||||
UserKeys UserCipherKeys
|
||||
Interface UserInterface
|
||||
Renew bool
|
||||
@@ -29,7 +30,8 @@ func (u *User) RenewKeys(setXor []uint64, attrXor []uint64) error {
|
||||
}
|
||||
|
||||
func (u *User) RefreshPasscode(passcodeAttrIdx []int, customerAttributes CustomerAttributes) error {
|
||||
newKeys, err := NewUserCipherKeys(customerAttributes.KeypadSize, customerAttributes.SetVals, u.UserKeys.MaxNKodeLen)
|
||||
setVals, err := customerAttributes.SetVals(u.Kp)
|
||||
newKeys, err := NewUserCipherKeys(&u.Kp, setVals, u.UserKeys.MaxNKodeLen)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user