This commit is contained in:
parent
173964a6fc
commit
21ef2f1372
5 changed files with 20 additions and 6 deletions
|
|
@ -68,7 +68,9 @@ func NewStudent(login string) (*Student, error) {
|
|||
}
|
||||
|
||||
func (s *Student) GetPKey() []byte {
|
||||
return hmac.New(sha512.New512_224, []byte(SharedSecret)).Sum([]byte(s.Login))
|
||||
h := hmac.New(sha512.New512_224, []byte(SharedSecret))
|
||||
h.Write([]byte(s.Login))
|
||||
return h.Sum(nil)
|
||||
}
|
||||
|
||||
func (s *Student) Update() (int64, error) {
|
||||
|
|
|
|||
Reference in a new issue