forked from I2P_Developers/i2p.i2p
misc. minor cleanups
This commit is contained in:
@ -62,10 +62,12 @@ public class LeaseSetKeys {
|
||||
*
|
||||
* @param dest unused
|
||||
* @param revocationKey unused, may be null
|
||||
* @param decryptionKeys non-null
|
||||
* @param decryptionKeys non-null, non-empty
|
||||
* @since 0.9.44
|
||||
*/
|
||||
public LeaseSetKeys(Destination dest, SigningPrivateKey revocationKey, List<PrivateKey> decryptionKeys) {
|
||||
if (decryptionKeys.isEmpty())
|
||||
throw new IllegalArgumentException("no keys");
|
||||
_revocationKey = revocationKey;
|
||||
PrivateKey elg = null;
|
||||
PrivateKey ec = null;
|
||||
|
@ -602,12 +602,12 @@ class ClientConnectionRunner {
|
||||
hasElg = true;
|
||||
}
|
||||
if (hasElg) {
|
||||
TransientSessionKeyManager tskm = new TransientSessionKeyManager(_context, tags, thresh);
|
||||
if (hasEC) {
|
||||
TransientSessionKeyManager tskm = new TransientSessionKeyManager(_context, tags, thresh);
|
||||
RatchetSKM rskm = new RatchetSKM(_context);
|
||||
_sessionKeyManager = new MuxedSKM(tskm, rskm);
|
||||
} else {
|
||||
_sessionKeyManager = new TransientSessionKeyManager(_context, tags, thresh);
|
||||
_sessionKeyManager = tskm;
|
||||
}
|
||||
} else {
|
||||
if (hasEC) {
|
||||
|
@ -40,19 +40,13 @@ public class RatchetSessionTag {
|
||||
}
|
||||
|
||||
/**
|
||||
* We assume the data has enough randomness in it, so use the first 4 bytes for speed.
|
||||
* If this is not the case, override in the extending class.
|
||||
* We assume the data has enough randomness in it, so use 4 bytes for speed.
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return (int) _data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Warning - this returns true for two different classes with the same size
|
||||
* and same data, e.g. SessionKey and SessionTag, but you wouldn't
|
||||
* put them in the same Set, would you?
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) return true;
|
||||
|
Reference in New Issue
Block a user