()
| 35 | } |
| 36 | |
| 37 | func (self *SyncthingOpts) hashPassword() string { |
| 38 | log.Debugln("Encrypting password", self.Password) |
| 39 | encPassword, err := bcrypt.GenerateFromPassword([]byte(self.Password), 0) |
| 40 | if err != nil { |
| 41 | log.Panicln("Could not encrypt password, HALP") |
| 42 | } |
| 43 | self.EncPassword = string(encPassword) |
| 44 | return self.EncPassword |
| 45 | } |
| 46 | |
| 47 | func (self *Syncthing) Install(opts *SyncthingOpts) error { |
| 48 | var err error |