mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-10-13 12:34:10 -04:00
update error messages
This commit is contained in:
@@ -2,9 +2,9 @@ package encoding
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"errors"
|
||||
"hash/fnv"
|
||||
|
||||
"v2ray.com/core/common/errors"
|
||||
"v2ray.com/core/common/serial"
|
||||
)
|
||||
|
||||
@@ -58,7 +58,7 @@ func (v *FnvAuthenticator) Seal(dst, nonce, plaintext, additionalData []byte) []
|
||||
// Open implements AEAD.Open().
|
||||
func (v *FnvAuthenticator) Open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) {
|
||||
if serial.BytesToUint32(ciphertext[:4]) != Authenticate(ciphertext[4:]) {
|
||||
return dst, errors.New("VMess|FNV: Invalid authentication.")
|
||||
return dst, errors.New("invalid authentication").Path("Proxy", "VMess", "Encoding", "FnvAuthenticator")
|
||||
}
|
||||
return append(dst, ciphertext[4:]...), nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user