mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-12-17 20:54:36 +03:00
mKCP: Fix key derivation for obfuscation (#5106)
Fixes https://github.com/XTLS/Xray-core/issues/5096
This commit is contained in:
@@ -9,5 +9,5 @@ import (
|
|||||||
|
|
||||||
func NewAEADAESGCMBasedOnSeed(seed string) cipher.AEAD {
|
func NewAEADAESGCMBasedOnSeed(seed string) cipher.AEAD {
|
||||||
hashedSeed := sha256.Sum256([]byte(seed))
|
hashedSeed := sha256.Sum256([]byte(seed))
|
||||||
return crypto.NewAesGcm(hashedSeed[:])
|
return crypto.NewAesGcm(hashedSeed[:16])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user