final all the crypto classes

This commit is contained in:
zzz
2016-01-24 16:37:21 +00:00
parent 403044fc6c
commit ad2561125e
19 changed files with 19 additions and 19 deletions

View File

@ -41,7 +41,7 @@ import net.i2p.util.SystemVersion;
*
* @since 0.9.9
*/
public class CertUtil {
public final class CertUtil {
private static final int LINE_LENGTH = 64;

View File

@ -36,7 +36,7 @@ import net.i2p.util.SystemVersion;
*
* @author jrandom, thecrypto
*/
public class CryptixAESEngine extends AESEngine {
public final class CryptixAESEngine extends AESEngine {
private final static CryptixRijndael_Algorithm _algo = new CryptixRijndael_Algorithm();
// keys are now cached in the SessionKey objects
//private CryptixAESKeyCache _cache;

View File

@ -44,7 +44,7 @@ import net.i2p.util.NativeBigInteger;
* See also: ECConstants, RSAConstants
*
*/
public class CryptoConstants {
public final class CryptoConstants {
public static final BigInteger dsap = new NativeBigInteger(
"9c05b2aa960d9b97b8931963c9cc9e8c3026e9b8ed92fad0a69cc886d5bf8015fcadae31"
+ "a0ad18fab3f01b00a358de237655c4964afaa2b337e96ad316b9fb1cc564b5aec5b69a9f"

View File

@ -72,7 +72,7 @@ import net.i2p.util.NativeBigInteger;
*
* EdDSA support added in 0.9.15
*/
public class DSAEngine {
public final class DSAEngine {
private final Log _log;
private final I2PAppContext _context;

View File

@ -20,7 +20,7 @@ import net.i2p.util.NativeBigInteger;
*
* @since 0.9.9
*/
class ECConstants {
final class ECConstants {
private static final boolean DEBUG = false;

View File

@ -19,7 +19,7 @@ import net.i2p.util.NativeBigInteger;
*
* @since 0.9.16
*/
class ECUtil {
final class ECUtil {
private static final BigInteger TWO = new BigInteger("2");
private static final BigInteger THREE = new BigInteger("3");

View File

@ -32,7 +32,7 @@ import net.i2p.util.SimpleByteCache;
*
* No, this does not extend AESEngine or CryptixAESEngine.
*/
public class ElGamalAESEngine {
public final class ElGamalAESEngine {
private final Log _log;
private final static int MIN_ENCRYPTED_SIZE = 80; // smallest possible resulting size
private final I2PAppContext _context;

View File

@ -52,7 +52,7 @@ import net.i2p.util.SimpleByteCache;
* @author thecrypto, jrandom
*/
public class ElGamalEngine {
public final class ElGamalEngine {
private final Log _log;
private final I2PAppContext _context;
private final YKGenerator _ykgen;

View File

@ -21,7 +21,7 @@ import org.bouncycastle.oldcrypto.macs.I2PHMac;
*
* Deprecated, used only by Syndie.
*/
public class HMAC256Generator extends HMACGenerator {
public final class HMAC256Generator extends HMACGenerator {
/**
* @param context unused

View File

@ -55,7 +55,7 @@ import net.i2p.util.RandomSource;
/** Define a way of generating asymmetrical key pairs as well as symmetrical keys
* @author jrandom
*/
public class KeyGenerator {
public final class KeyGenerator {
private final I2PAppContext _context;
public KeyGenerator(I2PAppContext context) {

View File

@ -33,7 +33,7 @@ import net.i2p.util.SystemVersion;
*
* @since 0.9.9
*/
public class KeyStoreUtil {
public final class KeyStoreUtil {
public static boolean _blacklistLogged;

View File

@ -10,7 +10,7 @@ import net.i2p.util.NativeBigInteger;
*
* @since 0.9.9
*/
class RSAConstants {
final class RSAConstants {
/**
* Generate a spec

View File

@ -50,7 +50,7 @@ import net.i2p.util.NativeBigInteger;
*
* @since 0.9.9, public since 0.9.12
*/
public class SigUtil {
public final class SigUtil {
private static final Map<SigningPublicKey, ECPublicKey> _ECPubkeyCache = new LHMCache<SigningPublicKey, ECPublicKey>(64);
private static final Map<SigningPrivateKey, ECPrivateKey> _ECPrivkeyCache = new LHMCache<SigningPrivateKey, ECPrivateKey>(16);

View File

@ -35,7 +35,7 @@ import net.i2p.util.SystemVersion;
*
* @author jrandom
*/
class YKGenerator {
final class YKGenerator {
//private final static Log _log = new Log(YKGenerator.class);
private final int MIN_NUM_BUILDERS;
private final int MAX_NUM_BUILDERS;

View File

@ -20,7 +20,7 @@ import net.i2p.crypto.eddsa.math.ScalarOps;
* @author str4d
*
*/
public class EdDSAEngine extends Signature {
public final class EdDSAEngine extends Signature {
private MessageDigest digest;
private final ByteArrayOutputStream baos;
private EdDSAKey key;

View File

@ -18,7 +18,7 @@ import net.i2p.crypto.eddsa.spec.EdDSAPublicKeySpec;
* @author str4d
*
*/
public class KeyFactory extends KeyFactorySpi {
public final class KeyFactory extends KeyFactorySpi {
/**
* As of 0.9.25, supports PKCS8EncodedKeySpec

View File

@ -21,7 +21,7 @@ import net.i2p.util.RandomSource;
*
* @since 0.9.15
*/
public class KeyPairGenerator extends KeyPairGeneratorSpi {
public final class KeyPairGenerator extends KeyPairGeneratorSpi {
private static final int DEFAULT_STRENGTH = 256;
private EdDSAParameterSpec edParams;
private SecureRandom random;

View File

@ -25,7 +25,7 @@ import net.i2p.crypto.elgamal.spec.ElGamalPublicKeySpec;
*
* @since 0.9.25
*/
public class KeyFactory extends KeyFactorySpi {
public final class KeyFactory extends KeyFactorySpi {
/**
* Supports PKCS8EncodedKeySpec

View File

@ -27,7 +27,7 @@ import net.i2p.util.RandomSource;
*
* @since 0.9.25
*/
public class KeyPairGenerator extends KeyPairGeneratorSpi {
public final class KeyPairGenerator extends KeyPairGeneratorSpi {
// always long, don't use short key
private static final int DEFAULT_STRENGTH = 2048;
private ElGamalParameterSpec elgParams;