mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 01:08:33 +00:00
Chore: Run gofmt (#3990)
This commit is contained in:
parent
bc4bf3d38f
commit
83bab5dd90
50 changed files with 272 additions and 273 deletions
|
@ -22,7 +22,7 @@ import (
|
|||
// MemoryAccount is an account type converted from Account.
|
||||
type MemoryAccount struct {
|
||||
Cipher Cipher
|
||||
CipherType CipherType
|
||||
CipherType CipherType
|
||||
Key []byte
|
||||
Password string
|
||||
|
||||
|
@ -42,8 +42,8 @@ func (a *MemoryAccount) Equals(another protocol.Account) bool {
|
|||
func (a *MemoryAccount) ToProto() proto.Message {
|
||||
return &Account{
|
||||
CipherType: a.CipherType,
|
||||
Password: a.Password,
|
||||
IvCheck: a.replayFilter != nil,
|
||||
Password: a.Password,
|
||||
IvCheck: a.replayFilter != nil,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -117,10 +117,10 @@ func (a *Account) AsAccount() (protocol.Account, error) {
|
|||
return nil, errors.New("failed to get cipher").Base(err)
|
||||
}
|
||||
return &MemoryAccount{
|
||||
Cipher: Cipher,
|
||||
Cipher: Cipher,
|
||||
CipherType: a.CipherType,
|
||||
Key: passwordToCipherKey([]byte(a.Password), Cipher.KeySize()),
|
||||
Password: a.Password,
|
||||
Key: passwordToCipherKey([]byte(a.Password), Cipher.KeySize()),
|
||||
Password: a.Password,
|
||||
replayFilter: func() antireplay.GeneralizedReplayFilter {
|
||||
if a.IvCheck {
|
||||
return antireplay.NewBloomRing()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue