Changeset a3fe746 for apps


Ignore:
Timestamp:
May 29, 2019 11:53:55 AM (11 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
e189236
Parents:
973aab8
Message:

store ls secret as b64

Location:
apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/GeneralHelper.java

    r973aab8 ra3fe746  
    1515import net.i2p.client.I2PClient;
    1616import net.i2p.crypto.SigType;
     17import net.i2p.data.Base64;
    1718import net.i2p.data.DataHelper;
    1819import net.i2p.data.Destination;
     
    597598     */
    598599    public String getBlindedPassword(int tunnel) {
    599         return getProperty(tunnel, "i2cp.leaseSetSecret", "");
     600        String rv = getProperty(tunnel, "i2cp.leaseSetSecret", null);
     601        if (rv != null)
     602            rv = DataHelper.getUTF8(Base64.decode(rv));
     603        if (rv == null)
     604            rv = "";
     605        return rv;
    600606    }
    601607   
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/TunnelConfig.java

    r973aab8 ra3fe746  
    278278    public void setBlindedPassword(String s) {
    279279        if (s != null && s.length() > 0)
    280             _otherOptions.put("i2cp.leaseSetSecret", s);
     280            _otherOptions.put("i2cp.leaseSetSecret", Base64.encode(DataHelper.getUTF8(s.trim())));
    281281        else
    282282            _otherOptions.remove("i2cp.leaseSetSecret");
Note: See TracChangeset for help on using the changeset viewer.