mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-08-23 01:56:48 +08:00
Refine must2 and apply NewAesGcm() to all usage
This commit is contained in:
@@ -58,11 +58,7 @@ func (a *MemoryAccount) CheckIV(iv []byte) error {
|
||||
}
|
||||
|
||||
func createAesGcm(key []byte) cipher.AEAD {
|
||||
block, err := aes.NewCipher(key)
|
||||
common.Must(err)
|
||||
gcm, err := cipher.NewGCM(block)
|
||||
common.Must(err)
|
||||
return gcm
|
||||
return crypto.NewAesGcm(key)
|
||||
}
|
||||
|
||||
func createChaCha20Poly1305(key []byte) cipher.AEAD {
|
||||
|
Reference in New Issue
Block a user