Changeset eca7ac2


Ignore:
Timestamp:
Sep 18, 2014 3:48:48 PM (6 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
9e7e294
Parents:
bc463f6d
Message:

remove bogus check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/crypto/DHSessionKeyBuilder.java

    rbc463f6d reca7ac2  
    125125            return null;
    126126        }
    127         if (1 == (Y[0] & 0x80)) {
    128             // high bit set, need to inject an additional byte to keep 2s complement
    129             if (_log.shouldLog(Log.DEBUG))
    130                 _log.debug("High bit set");
    131             byte Y2[] = new byte[257];
    132             System.arraycopy(Y, 0, Y2, 1, 256);
    133             Y = Y2;
    134         }
    135127        return new NativeBigInteger(1, Y);
    136128    }
     
    218210        if (val.length != 256)
    219211            throw new IllegalArgumentException("Peer public value must be exactly 256 bytes");
    220 
    221         if (1 == (val[0] & 0x80)) {
    222             // high bit set, need to inject an additional byte to keep 2s complement
    223             //if (_log.shouldLog(Log.DEBUG))
    224             //    _log.debug("High bit set");
    225             byte val2[] = new byte[257];
    226             System.arraycopy(val, 0, val2, 1, 256);
    227             val = val2;
    228         }
    229212        setPeerPublicValue(new NativeBigInteger(1, val));
    230         //_peerValue = new NativeBigInteger(val);
    231213    }
    232214
Note: See TracChangeset for help on using the changeset viewer.