forked from I2P_Developers/i2p.i2p
store ls secret as b64
This commit is contained in:
@@ -14,6 +14,7 @@ import net.i2p.I2PAppContext;
|
||||
import net.i2p.I2PException;
|
||||
import net.i2p.client.I2PClient;
|
||||
import net.i2p.crypto.SigType;
|
||||
import net.i2p.data.Base64;
|
||||
import net.i2p.data.DataHelper;
|
||||
import net.i2p.data.Destination;
|
||||
import net.i2p.data.Hash;
|
||||
@@ -596,7 +597,12 @@ public class GeneralHelper {
|
||||
* @since 0.9.40
|
||||
*/
|
||||
public String getBlindedPassword(int tunnel) {
|
||||
return getProperty(tunnel, "i2cp.leaseSetSecret", "");
|
||||
String rv = getProperty(tunnel, "i2cp.leaseSetSecret", null);
|
||||
if (rv != null)
|
||||
rv = DataHelper.getUTF8(Base64.decode(rv));
|
||||
if (rv == null)
|
||||
rv = "";
|
||||
return rv;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -277,7 +277,7 @@ public class TunnelConfig {
|
||||
/** @since 0.9.40 */
|
||||
public void setBlindedPassword(String s) {
|
||||
if (s != null && s.length() > 0)
|
||||
_otherOptions.put("i2cp.leaseSetSecret", s);
|
||||
_otherOptions.put("i2cp.leaseSetSecret", Base64.encode(DataHelper.getUTF8(s.trim())));
|
||||
else
|
||||
_otherOptions.remove("i2cp.leaseSetSecret");
|
||||
}
|
||||
|
Reference in New Issue
Block a user