NTCP2: Remove dup getHash() method

This commit is contained in:
zzz
2018-07-11 14:25:43 +00:00
parent 9d2f684ac7
commit b78870de54
3 changed files with 1 additions and 11 deletions

View File

@ -882,14 +882,6 @@ public class HandshakeState implements Destroyable {
return symmetric.getChainingKey();
}
/**
* I2P for getting current hash for siphash calculation
* @return NOT a copy, do not modify
*/
public byte[] getHash() {
return symmetric.getHandshakeHash();
}
/**
* I2P debug
*/

View File

@ -343,8 +343,6 @@ class NTCP2Payload {
* Big endian.
* Same as DataHelper.fromLong(src, offset, 8) but allows negative result
*
* Package private for NTCP2Payload.
*
* @throws ArrayIndexOutOfBoundsException
* @since 0.9.36
*/

View File

@ -442,7 +442,7 @@ class OutboundNTCP2State implements EstablishState {
tk = new SessionKey(temp_key);
byte[] ask_master = doHMAC(ctx, tk, ASK);
byte[] tmp = new byte[32 + SIPHASH.length];
byte[] hash = state.getHash();
byte[] hash = state.getHandshakeHash();
System.arraycopy(hash, 0, tmp, 0, 32);
System.arraycopy(SIPHASH, 0, tmp, 32, SIPHASH.length);
tk = new SessionKey(ask_master);