X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/69af8ddbdff8e6d0dd551e9bdc72284469a86fc0..23951f11736687ae7f420db20160a9fd76aa4856:/hotline/account.go?ds=sidebyside diff --git a/hotline/account.go b/hotline/account.go index 9a0fb7d..b041f3c 100644 --- a/hotline/account.go +++ b/hotline/account.go @@ -18,13 +18,13 @@ type Account struct { // Read implements io.Reader interface for Account func (a *Account) Read(p []byte) (n int, err error) { fields := []Field{ - NewField(fieldUserName, []byte(a.Name)), - NewField(fieldUserLogin, negateString([]byte(a.Login))), - NewField(fieldUserAccess, a.Access[:]), + NewField(FieldUserName, []byte(a.Name)), + NewField(FieldUserLogin, encodeString([]byte(a.Login))), + NewField(FieldUserAccess, a.Access[:]), } if bcrypt.CompareHashAndPassword([]byte(a.Password), []byte("")) != nil { - fields = append(fields, NewField(fieldUserPassword, []byte("x"))) + fields = append(fields, NewField(FieldUserPassword, []byte("x"))) } fieldCount := make([]byte, 2)