Changeset 8a4c469 for core


Ignore:
Timestamp:
May 31, 2019 3:26:20 PM (10 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
1109331
Parents:
b4f331e6
Message:

Blinding: cache b32, sort by b32 on /configkeyring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/data/BlindData.java

    rb4f331e6 r8a4c469  
    2929    private boolean _authRequired;
    3030    private long _date;
     31    private String _b32;
    3132
    3233    /**
     
    218219     */
    219220    public synchronized String toBase32() {
    220         return Blinding.encode(_clearSPK, _secret != null, _authKey != null);
    221     }
    222 
    223     /**
    224      *  @since 0.9.41
    225      */
    226     public void setSecretRequired() {
     221        if (_b32 == null)
     222            _b32 = Blinding.encode(_clearSPK, _secretRequired, _authRequired);
     223        return _b32;
     224    }
     225
     226    /**
     227     *  @since 0.9.41
     228     */
     229    public synchronized void setSecretRequired() {
    227230        _secretRequired = true;
     231        _b32 = null;
    228232    }
    229233
     
    238242     *  @since 0.9.41
    239243     */
    240     public void setAuthRequired() {
     244    public synchronized void setAuthRequired() {
    241245        _authRequired = true;
     246        _b32 = null;
    242247    }
    243248
Note: See TracChangeset for help on using the changeset viewer.