mirror of
https://github.com/e1732a364fed/v2ray_simple.git
synced 2025-12-24 13:27:56 +08:00
修订trojan.User 代码
This commit is contained in:
@@ -63,12 +63,15 @@ func PassBytesToStr(bs []byte) string {
|
||||
|
||||
type User struct {
|
||||
hexStr string
|
||||
hexBs []byte
|
||||
plainStr string
|
||||
}
|
||||
|
||||
func NewUserByPlainTextPassword(plainPass string) User {
|
||||
bs := SHA224(plainPass)
|
||||
return User{
|
||||
hexStr: SHA224_hexString(plainPass),
|
||||
hexBs: bs[:],
|
||||
plainStr: plainPass,
|
||||
}
|
||||
}
|
||||
@@ -90,7 +93,7 @@ func (u User) AuthStr() string {
|
||||
|
||||
//28字节纯二进制
|
||||
func (u User) AuthBytes() []byte {
|
||||
return PassStrToBytes(u.hexStr)
|
||||
return u.hexBs
|
||||
}
|
||||
|
||||
func InitUsers(uc []utils.UserConf) (us []utils.User) {
|
||||
|
||||
Reference in New Issue
Block a user