PasswdField: Remove unused property.
MODIFY
WalletWasabi/Tor/Socks5/Models/Fields/ByteArrayFields/PasswdField.cs
WalletWasabi/Tor/Socks5/Models/Fields/ByteArrayFields/PasswdField.cs
@@ -11,15 +11,13 @@ namespace WalletWasabi.Tor.Socks5.Models.Fields.ByteArrayFields
Bytes = Guard.NotNullOrEmpty(nameof(bytes), bytes);
}
- public PasswdField(string passwd)
- : this(Encoding.UTF8.GetBytes(passwd))
+ public PasswdField(string password)
+ : this(Encoding.UTF8.GetBytes(password))
{
}
private byte[] Bytes { get; }
- public string Passwd => Encoding.UTF8.GetString(Bytes); // Tor accepts UTF8 encoded passwd
-
public override byte[] ToBytes() => Bytes;
}
}

MODIFY
WalletWasabi/Tor/Socks5/TorSocks5Client.cs
WalletWasabi/Tor/Socks5/TorSocks5Client.cs
@@ -152,7 +152,7 @@ namespace WalletWasabi.Tor.Socks5
// Username / Password request:
var identity = RandomString.CapitalAlphaNumeric(21);
var uName = new UNameField(uName: identity);
- var passwd = new PasswdField(passwd: identity);
+ var passwd = new PasswdField(password: identity);
var usernamePasswordRequest = new UsernamePasswordRequest(uName, passwd);
sendBuffer = usernamePasswordRequest.ToBytes();

PasswdField: Remove unused property.