- Login string `yaml:"Login"`
- Name string `yaml:"Name"`
- Password string `yaml:"Password"`
- Access *[]byte `yaml:"Access"` // 8 byte bitmap
+ Login string `yaml:"Login"`
+ Name string `yaml:"Name"`
+ Password string `yaml:"Password"`
+ Access AccessBitmap `yaml:"Access"`
+ FileRoot string `yaml:"FileRoot"`
+
+ readOffset int // Internal offset to track read progress
+}
+
+func NewAccount(login, name, password string, access AccessBitmap) *Account {
+ return &Account{
+ Login: login,
+ Name: name,
+ Password: HashAndSalt([]byte(password)),
+ Access: access,
+ }