mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-17 12:33:01 +00:00
25 lines
345 B
Go
25 lines
345 B
Go
|
package mtproto
|
||
|
|
||
|
import (
|
||
|
"github.com/xtls/xray-core/v1/common/protocol"
|
||
|
)
|
||
|
|
||
|
func (a *Account) Equals(another protocol.Account) bool {
|
||
|
aa, ok := another.(*Account)
|
||
|
if !ok {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
if len(a.Secret) != len(aa.Secret) {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
for i, v := range a.Secret {
|
||
|
if v != aa.Secret[i] {
|
||
|
return false
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return true
|
||
|
}
|