mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8285263: Minor cleanup could be done in java.security
Reviewed-by: weijun
This commit is contained in:
parent
b97a4f6cdc
commit
17695962ac
94 changed files with 480 additions and 601 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 1998, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -47,5 +47,5 @@ public interface DSAKey {
|
|||
*
|
||||
* @see DSAParams
|
||||
*/
|
||||
public DSAParams getParams();
|
||||
DSAParams getParams();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -88,8 +88,7 @@ public interface DSAKeyPairGenerator {
|
|||
* @throws InvalidParameterException if the {@code params}
|
||||
* value is invalid, null, or unsupported.
|
||||
*/
|
||||
public void initialize(DSAParams params, SecureRandom random)
|
||||
throws InvalidParameterException;
|
||||
void initialize(DSAParams params, SecureRandom random);
|
||||
|
||||
/**
|
||||
* Initializes the key pair generator for a given modulus length
|
||||
|
@ -109,13 +108,12 @@ public interface DSAKeyPairGenerator {
|
|||
* @param random the random bit source to use to generate key bits;
|
||||
* can be null.
|
||||
*
|
||||
* @param genParams whether or not to generate new parameters for
|
||||
* @param genParams whether to generate new parameters for
|
||||
* the modulus length requested.
|
||||
*
|
||||
* @throws InvalidParameterException if {@code modlen} is
|
||||
* invalid, or unsupported, or if {@code genParams} is false and there
|
||||
* are no precomputed parameters for the requested modulus length.
|
||||
*/
|
||||
public void initialize(int modlen, boolean genParams, SecureRandom random)
|
||||
throws InvalidParameterException;
|
||||
void initialize(int modlen, boolean genParams, SecureRandom random);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -47,19 +47,19 @@ public interface DSAParams {
|
|||
*
|
||||
* @return the prime, {@code p}.
|
||||
*/
|
||||
public BigInteger getP();
|
||||
BigInteger getP();
|
||||
|
||||
/**
|
||||
* Returns the subprime, {@code q}.
|
||||
*
|
||||
* @return the subprime, {@code q}.
|
||||
*/
|
||||
public BigInteger getQ();
|
||||
BigInteger getQ();
|
||||
|
||||
/**
|
||||
* Returns the base, {@code g}.
|
||||
*
|
||||
* @return the base, {@code g}.
|
||||
*/
|
||||
public BigInteger getG();
|
||||
BigInteger getG();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -54,12 +54,12 @@ public interface DSAPrivateKey extends DSAKey, java.security.PrivateKey {
|
|||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = 7776497482533790279L;
|
||||
long serialVersionUID = 7776497482533790279L;
|
||||
|
||||
/**
|
||||
* Returns the value of the private key, {@code x}.
|
||||
*
|
||||
* @return the value of the private key, {@code x}.
|
||||
*/
|
||||
public BigInteger getX();
|
||||
BigInteger getX();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -54,12 +54,12 @@ public interface DSAPublicKey extends DSAKey, java.security.PublicKey {
|
|||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = 1234526332779022332L;
|
||||
long serialVersionUID = 1234526332779022332L;
|
||||
|
||||
/**
|
||||
* Returns the value of the public key, {@code y}.
|
||||
*
|
||||
* @return the value of the public key, {@code y}.
|
||||
*/
|
||||
public BigInteger getY();
|
||||
BigInteger getY();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -49,7 +49,7 @@ public interface ECPrivateKey extends PrivateKey, ECKey {
|
|||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = -7896394956925609184L;
|
||||
long serialVersionUID = -7896394956925609184L;
|
||||
|
||||
/**
|
||||
* Returns the private value S.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -51,7 +51,7 @@ public interface ECPublicKey extends PublicKey, ECKey {
|
|||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = -3314988629879632826L;
|
||||
long serialVersionUID = -3314988629879632826L;
|
||||
|
||||
/**
|
||||
* Returns the public point W.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -48,7 +48,7 @@ public interface RSAKey {
|
|||
*
|
||||
* @return the modulus
|
||||
*/
|
||||
public BigInteger getModulus();
|
||||
BigInteger getModulus();
|
||||
|
||||
/**
|
||||
* Returns the parameters associated with this key.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -57,49 +57,49 @@ public interface RSAMultiPrimePrivateCrtKey extends RSAPrivateKey {
|
|||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = 618058533534628008L;
|
||||
long serialVersionUID = 618058533534628008L;
|
||||
|
||||
/**
|
||||
* Returns the public exponent.
|
||||
*
|
||||
* @return the public exponent.
|
||||
*/
|
||||
public BigInteger getPublicExponent();
|
||||
BigInteger getPublicExponent();
|
||||
|
||||
/**
|
||||
* Returns the primeP.
|
||||
*
|
||||
* @return the primeP.
|
||||
*/
|
||||
public BigInteger getPrimeP();
|
||||
BigInteger getPrimeP();
|
||||
|
||||
/**
|
||||
* Returns the primeQ.
|
||||
*
|
||||
* @return the primeQ.
|
||||
*/
|
||||
public BigInteger getPrimeQ();
|
||||
BigInteger getPrimeQ();
|
||||
|
||||
/**
|
||||
* Returns the primeExponentP.
|
||||
*
|
||||
* @return the primeExponentP.
|
||||
*/
|
||||
public BigInteger getPrimeExponentP();
|
||||
BigInteger getPrimeExponentP();
|
||||
|
||||
/**
|
||||
* Returns the primeExponentQ.
|
||||
*
|
||||
* @return the primeExponentQ.
|
||||
*/
|
||||
public BigInteger getPrimeExponentQ();
|
||||
BigInteger getPrimeExponentQ();
|
||||
|
||||
/**
|
||||
* Returns the crtCoefficient.
|
||||
*
|
||||
* @return the crtCoefficient.
|
||||
*/
|
||||
public BigInteger getCrtCoefficient();
|
||||
BigInteger getCrtCoefficient();
|
||||
|
||||
/**
|
||||
* Returns the otherPrimeInfo or null if there are only
|
||||
|
@ -107,5 +107,5 @@ public interface RSAMultiPrimePrivateCrtKey extends RSAPrivateKey {
|
|||
*
|
||||
* @return the otherPrimeInfo.
|
||||
*/
|
||||
public RSAOtherPrimeInfo[] getOtherPrimeInfo();
|
||||
RSAOtherPrimeInfo[] getOtherPrimeInfo();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -52,47 +52,47 @@ public interface RSAPrivateCrtKey extends RSAPrivateKey {
|
|||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = -5682214253527700368L;
|
||||
long serialVersionUID = -5682214253527700368L;
|
||||
|
||||
/**
|
||||
* Returns the public exponent.
|
||||
*
|
||||
* @return the public exponent
|
||||
*/
|
||||
public BigInteger getPublicExponent();
|
||||
BigInteger getPublicExponent();
|
||||
|
||||
/**
|
||||
* Returns the primeP.
|
||||
*
|
||||
* @return the primeP
|
||||
*/
|
||||
public BigInteger getPrimeP();
|
||||
BigInteger getPrimeP();
|
||||
|
||||
/**
|
||||
* Returns the primeQ.
|
||||
*
|
||||
* @return the primeQ
|
||||
*/
|
||||
public BigInteger getPrimeQ();
|
||||
BigInteger getPrimeQ();
|
||||
|
||||
/**
|
||||
* Returns the primeExponentP.
|
||||
*
|
||||
* @return the primeExponentP
|
||||
*/
|
||||
public BigInteger getPrimeExponentP();
|
||||
BigInteger getPrimeExponentP();
|
||||
|
||||
/**
|
||||
* Returns the primeExponentQ.
|
||||
*
|
||||
* @return the primeExponentQ
|
||||
*/
|
||||
public BigInteger getPrimeExponentQ();
|
||||
BigInteger getPrimeExponentQ();
|
||||
|
||||
/**
|
||||
* Returns the crtCoefficient.
|
||||
*
|
||||
* @return the crtCoefficient
|
||||
*/
|
||||
public BigInteger getCrtCoefficient();
|
||||
BigInteger getCrtCoefficient();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -51,12 +51,12 @@ public interface RSAPrivateKey extends java.security.PrivateKey, RSAKey
|
|||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = 5187144804936595022L;
|
||||
long serialVersionUID = 5187144804936595022L;
|
||||
|
||||
/**
|
||||
* Returns the private exponent.
|
||||
*
|
||||
* @return the private exponent
|
||||
*/
|
||||
public BigInteger getPrivateExponent();
|
||||
BigInteger getPrivateExponent();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -48,12 +48,12 @@ public interface RSAPublicKey extends java.security.PublicKey, RSAKey
|
|||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
@java.io.Serial
|
||||
static final long serialVersionUID = -8727434096241101194L;
|
||||
long serialVersionUID = -8727434096241101194L;
|
||||
|
||||
/**
|
||||
* Returns the public exponent.
|
||||
*
|
||||
* @return the public exponent
|
||||
*/
|
||||
public BigInteger getPublicExponent();
|
||||
BigInteger getPublicExponent();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue