chore: using named const value

This commit is contained in:
wwqgtxx
2025-08-11 11:29:51 +08:00
parent b41ea05481
commit d7999a32d3
6 changed files with 11 additions and 10 deletions

View File

@@ -475,7 +475,7 @@ func NewVless(option VlessOption) (*Vless, error) {
if err != nil {
return nil, fmt.Errorf("invaild vless encryption value: %s", option.Encryption)
}
if len(b) == 1184 {
if len(b) == encryption.MLKEM768ClientLength {
v.encryption = &encryption.ClientInstance{}
if err = v.encryption.Init(b, time.Duration(minutes)*time.Minute); err != nil {
return nil, fmt.Errorf("failed to use mlkem768seed: %w", err)