2005-10-17 jrandom
* Allow an env prop to configure whether we want to use the backwards compatible (but not standards compliant) HMAC-MD5, or whether we want to use the not-backwards compatible (but standards compliant) one. No one should touch this setting, unless your name is toad or jrandom ;) * Added some new dummy facades * Be more aggressive on loading up the router.config before building the router context * Added new hooks for apps to deal with previously undefined I2NP message types without having to modify any code. * Demo code for using a castrated router for SSU comm (SSUDemo.java)
This commit is contained in:
@ -28,6 +28,7 @@ public class HMACSHA256Generator {
|
||||
/** set of available byte[] buffers for verify */
|
||||
private List _availableTmp;
|
||||
private boolean _useMD5;
|
||||
private int _macSize;
|
||||
|
||||
public static final boolean DEFAULT_USE_MD5 = true;
|
||||
|
||||
@ -39,6 +40,10 @@ public class HMACSHA256Generator {
|
||||
_useMD5 = true;
|
||||
else
|
||||
_useMD5 = false;
|
||||
if ("true".equals(context.getProperty("i2p.HMACBrokenSize", "true")))
|
||||
_macSize = 32;
|
||||
else
|
||||
_macSize = (_useMD5 ? 16 : 32);
|
||||
}
|
||||
|
||||
public static HMACSHA256Generator getInstance() {
|
||||
|
Reference in New Issue
Block a user