final class PBKDF2KeyImpl extends Object implements PBEKey
| 限定符和类型 | 字段和说明 |
|---|---|
private int |
iterCount |
private byte[] |
key |
private char[] |
passwd |
private Mac |
prf |
private byte[] |
salt |
private static long |
serialVersionUID |
| 构造器和说明 |
|---|
PBKDF2KeyImpl(PBEKeySpec keySpec,
String prfAlgo)
Creates a PBE key from a given PBE key specification.
|
| 限定符和类型 | 方法和说明 |
|---|---|
private static byte[] |
deriveKey(Mac prf,
byte[] password,
byte[] salt,
int iterCount,
int keyLengthInBit) |
boolean |
equals(Object obj) |
protected void |
finalize()
Ensures that the password bytes of this key are
erased when there are no more references to it.
|
String |
getAlgorithm() |
byte[] |
getEncoded() |
String |
getFormat() |
int |
getIterationCount() |
char[] |
getPassword() |
private static byte[] |
getPasswordBytes(char[] passwd) |
byte[] |
getSalt() |
int |
hashCode()
Calculates a hash code value for the object.
|
private void |
readObject(ObjectInputStream stream)
Restores the state of this object from the stream.
|
private Object |
writeReplace()
Replace the PBE key to be serialized.
|
destroy, isDestroyedprivate static final long serialVersionUID
private char[] passwd
private final byte[] salt
private final int iterCount
private byte[] key
private final Mac prf
PBKDF2KeyImpl(PBEKeySpec keySpec, String prfAlgo) throws InvalidKeySpecException
key - the given PBE key specificationInvalidKeySpecExceptionprivate static byte[] getPasswordBytes(char[] passwd)
private static byte[] deriveKey(Mac prf, byte[] password, byte[] salt, int iterCount, int keyLengthInBit)
public byte[] getEncoded()
getEncoded 在接口中 Keypublic String getAlgorithm()
getAlgorithm 在接口中 Keypublic int getIterationCount()
getIterationCount 在接口中 PBEKeypublic char[] getPassword()
getPassword 在接口中 PBEKeypublic int hashCode()
private Object writeReplace() throws ObjectStreamException
ObjectStreamException - if a new object representing
this PBE key could not be createdprotected void finalize()
throws Throwable
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
Deserialization of this class is not supported.
stream - the ObjectInputStream from which data is readIOException - if an I/O error occursClassNotFoundException - if a serialized class cannot be loadedCopyright © 2024. All rights reserved.