This commit is contained in:
zzz
2011-11-14 15:05:26 +00:00
parent 0675c4caeb
commit 7f467dbdc8
2 changed files with 11 additions and 3 deletions

View File

@ -30,11 +30,11 @@ import net.i2p.util.RandomSource;
* @author jrandom
*/
public class KeyGenerator {
private final Log _log;
//private final Log _log;
private final I2PAppContext _context;
public KeyGenerator(I2PAppContext context) {
_log = context.logManager().getLog(KeyGenerator.class);
//_log = context.logManager().getLog(KeyGenerator.class);
_context = context;
}
@ -55,7 +55,12 @@ public class KeyGenerator {
}
private static final int PBE_ROUNDS = 1000;
/** PBE the passphrase with the salt */
/**
* PBE the passphrase with the salt.
* Warning - SLOW
* @deprecated unused
*/
public SessionKey generateSessionKey(byte salt[], byte passphrase[]) {
byte salted[] = new byte[16+passphrase.length];
System.arraycopy(salt, 0, salted, 0, Math.min(salt.length, 16));
@ -68,6 +73,7 @@ public class KeyGenerator {
/** standard exponent size */
private static final int PUBKEY_EXPONENT_SIZE_FULL = 2048;
/**
* short exponent size, which should be safe for use with the Oakley primes,
* per "On Diffie-Hellman Key Agreement with Short Exponents" - van Oorschot, Weiner

View File

@ -759,6 +759,7 @@ public final class SHA1 extends MessageDigest implements Cloneable {
*
* @since 0.8.7
*/
/****
public static void main(String args[]) {
if (args.length <= 0) {
System.err.println("Usage: SHA1 string");
@ -797,4 +798,5 @@ public final class SHA1 extends MessageDigest implements Cloneable {
System.out.println("JVM time (ms): " + time);
}
****/
}