- Local mods and wrapper for SipHashInline

- Convert SessionTag.hashCode() to SipHash to prevent collision attacks
     in the SessionKeyManager; cache for speed
This commit is contained in:
zzz
2013-01-02 14:01:29 +00:00
parent 20cc48cd87
commit 6ed602309f
8 changed files with 182 additions and 7 deletions

View File

@@ -1,3 +1,26 @@
package net.i2p.util;
/*
* As pulled from https://github.com/nahi/siphash-java-inline
* Last commit was https://github.com/nahi/siphash-java-inline/commit/5be5c84851a28f800fcac66ced658bdbd01f31ef
* 2012-11-06
*
* Copyright 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import junit.framework.TestCase;
public class SipHashInlineTest extends TestCase {

View File

@@ -19,7 +19,8 @@ public class UtilTestSuite {
suite.addTestSuite(ResettableGZIPOutputStreamTest.class);
suite.addTestSuite(ReusableGZIPInputStreamTest.class);
suite.addTestSuite(ReusableGZIPOutputStreamTest.class);
suite.addTestSuite(SipHashInlineTest.class);
return suite;
}
}
}