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
|
@ -25,15 +25,13 @@
|
|||
|
||||
package java.security;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.io.NotSerializableException;
|
||||
import java.io.ObjectStreamException;
|
||||
import java.io.Serializable;
|
||||
import java.security.spec.PKCS8EncodedKeySpec;
|
||||
import java.security.spec.X509EncodedKeySpec;
|
||||
import java.security.spec.InvalidKeySpecException;
|
||||
|
||||
import javax.crypto.SecretKeyFactory;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Standardized representation for serialized Key objects.
|
||||
|
@ -65,7 +63,7 @@ public class KeyRep implements Serializable {
|
|||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
public static enum Type {
|
||||
public enum Type {
|
||||
|
||||
/** Type for secret keys. */
|
||||
SECRET,
|
||||
|
@ -87,28 +85,28 @@ public class KeyRep implements Serializable {
|
|||
*
|
||||
* @serial
|
||||
*/
|
||||
private Type type;
|
||||
private final Type type;
|
||||
|
||||
/**
|
||||
* The Key algorithm
|
||||
*
|
||||
* @serial
|
||||
*/
|
||||
private String algorithm;
|
||||
private final String algorithm;
|
||||
|
||||
/**
|
||||
* The Key encoding format
|
||||
*
|
||||
* @serial
|
||||
*/
|
||||
private String format;
|
||||
private final String format;
|
||||
|
||||
/**
|
||||
* The encoded Key bytes
|
||||
*
|
||||
* @serial
|
||||
*/
|
||||
private byte[] encoded;
|
||||
private final byte[] encoded;
|
||||
|
||||
/**
|
||||
* Construct the alternate Key class.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue