@Deprecated public class TlsKeyMaterialParameterSpec extends Object implements AlgorithmParameterSpec
TlsKeyMaterialSpec.
Instances of this class are immutable.
| 限定符和类型 | 字段和说明 |
|---|---|
private String |
cipherAlgorithm
已过时。
|
private int |
cipherKeyLength
已过时。
|
private byte[] |
clientRandom
已过时。
|
private int |
expandedCipherKeyLength
已过时。
|
private int |
ivLength
已过时。
|
private int |
macKeyLength
已过时。
|
private int |
majorVersion
已过时。
|
private SecretKey |
masterSecret
已过时。
|
private int |
minorVersion
已过时。
|
private int |
prfBlockSize
已过时。
|
private String |
prfHashAlg
已过时。
|
private int |
prfHashLength
已过时。
|
private byte[] |
serverRandom
已过时。
|
| 构造器和说明 |
|---|
TlsKeyMaterialParameterSpec(SecretKey masterSecret,
int majorVersion,
int minorVersion,
byte[] clientRandom,
byte[] serverRandom,
String cipherAlgorithm,
int cipherKeyLength,
int expandedCipherKeyLength,
int ivLength,
int macKeyLength,
String prfHashAlg,
int prfHashLength,
int prfBlockSize)
已过时。
Constructs a new TlsKeyMaterialParameterSpec.
|
| 限定符和类型 | 方法和说明 |
|---|---|
private static int |
checkSign(int k)
已过时。
|
String |
getCipherAlgorithm()
已过时。
Returns the cipher algorithm.
|
int |
getCipherKeyLength()
已过时。
Returns the length in bytes of the encryption key to be generated.
|
byte[] |
getClientRandom()
已过时。
Returns a copy of the client's random value.
|
int |
getExpandedCipherKeyLength()
已过时。
Returns the length in bytes of the expanded encryption key to be
generated.
|
int |
getIvLength()
已过时。
Returns the length in bytes of the initialization vector to be
generated.
|
int |
getMacKeyLength()
已过时。
Returns the length in bytes of the MAC key to be generated.
|
int |
getMajorVersion()
已过时。
Returns the major version number.
|
SecretKey |
getMasterSecret()
已过时。
Returns the master secret.
|
int |
getMinorVersion()
已过时。
Returns the minor version number.
|
int |
getPRFBlockSize()
已过时。
Obtains the block size of the PRF hash algorithm.
|
String |
getPRFHashAlg()
已过时。
Obtains the PRF hash algorithm to use in the PRF calculation.
|
int |
getPRFHashLength()
已过时。
Obtains the length of the PRF hash algorithm.
|
byte[] |
getServerRandom()
已过时。
Returns a copy of the server's random value.
|
private final SecretKey masterSecret
private final int majorVersion
private final int minorVersion
private final byte[] clientRandom
private final byte[] serverRandom
private final String cipherAlgorithm
private final int cipherKeyLength
private final int ivLength
private final int macKeyLength
private final int expandedCipherKeyLength
private final String prfHashAlg
private final int prfHashLength
private final int prfBlockSize
public TlsKeyMaterialParameterSpec(SecretKey masterSecret, int majorVersion, int minorVersion, byte[] clientRandom, byte[] serverRandom, String cipherAlgorithm, int cipherKeyLength, int expandedCipherKeyLength, int ivLength, int macKeyLength, String prfHashAlg, int prfHashLength, int prfBlockSize)
masterSecret - the master secretmajorVersion - the major number of the protocol versionminorVersion - the minor number of the protocol versionclientRandom - the client's random valueserverRandom - the server's random valuecipherAlgorithm - the algorithm name of the cipher keys to
be generatedcipherKeyLength - if 0, no cipher keys will be generated;
otherwise, the length in bytes of cipher keys to be
generated for domestic cipher suites; for cipher suites defined as
exportable, the number of key material bytes to be generated;expandedCipherKeyLength - 0 for domestic cipher suites; for
exportable cipher suites the length in bytes of the key to be
generated.ivLength - the length in bytes of the initialization vector
to be generated, or 0 if no initialization vector is requiredmacKeyLength - the length in bytes of the MAC key to be generatedprfHashAlg - the name of the TLS PRF hash algorithm to use.
Used only for TLS 1.2+. TLS1.1 and earlier use a fixed PRF.prfHashLength - the output length of the TLS PRF hash algorithm.
Used only for TLS 1.2+.prfBlockSize - the input block size of the TLS PRF hash algorithm.
Used only for TLS 1.2+.NullPointerException - if masterSecret, clientRandom,
serverRandom, or cipherAlgorithm are nullIllegalArgumentException - if the algorithm of masterSecret is
not TlsMasterSecret, or if majorVersion or minorVersion are
negative or larger than 255; or if cipherKeyLength, expandedKeyLength,
ivLength, or macKeyLength are negativeprivate static int checkSign(int k)
public SecretKey getMasterSecret()
public int getMajorVersion()
public int getMinorVersion()
public byte[] getClientRandom()
public byte[] getServerRandom()
public String getCipherAlgorithm()
public int getCipherKeyLength()
public int getExpandedCipherKeyLength()
public int getIvLength()
public int getMacKeyLength()
public String getPRFHashAlg()
public int getPRFHashLength()
public int getPRFBlockSize()
Copyright © 2023. All rights reserved.