Merge from remote branch
This commit is contained in:
commit
04ac1e948b
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,7 @@ func (a *authAES128) Encode(buf *bytes.Buffer, b []byte) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *authAES128) DecodePacket(b []byte) ([]byte, error) {
|
func (a *authAES128) DecodePacket(b []byte) ([]byte, error) {
|
||||||
if !bytes.Equal(a.hmac(a.userKey, b[:len(b)-4])[:4], b[len(b)-4:]) {
|
if !bytes.Equal(a.hmac(a.Key, b[:len(b)-4])[:4], b[len(b)-4:]) {
|
||||||
return nil, errAuthAES128ChksumError
|
return nil, errAuthAES128ChksumError
|
||||||
}
|
}
|
||||||
return b[:len(b)-4], nil
|
return b[:len(b)-4], nil
|
||||||
|
|
Loading…
Reference in a new issue