@Deprecated
public class TlsKeyMaterialParameterSpec
extends java.lang.Object
implements java.security.spec.AlgorithmParameterSpec
TlsKeyMaterialSpec.
Instances of this class are immutable.
| Constructor and Description |
|---|
TlsKeyMaterialParameterSpec(javax.crypto.SecretKey masterSecret,
int majorVersion,
int minorVersion,
byte[] clientRandom,
byte[] serverRandom,
java.lang.String cipherAlgorithm,
int cipherKeyLength,
int expandedCipherKeyLength,
int ivLength,
int macKeyLength,
java.lang.String prfHashAlg,
int prfHashLength,
int prfBlockSize)
Deprecated.
Constructs a new TlsKeyMaterialParameterSpec.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCipherAlgorithm()
Deprecated.
Returns the cipher algorithm.
|
int |
getCipherKeyLength()
Deprecated.
Returns the length in bytes of the encryption key to be generated.
|
byte[] |
getClientRandom()
Deprecated.
Returns a copy of the client's random value.
|
int |
getExpandedCipherKeyLength()
Deprecated.
Returns the length in bytes of the expanded encryption key to be
generated.
|
int |
getIvLength()
Deprecated.
Returns the length in bytes of the initialization vector to be
generated.
|
int |
getMacKeyLength()
Deprecated.
Returns the length in bytes of the MAC key to be generated.
|
int |
getMajorVersion()
Deprecated.
Returns the major version number.
|
javax.crypto.SecretKey |
getMasterSecret()
Deprecated.
Returns the master secret.
|
int |
getMinorVersion()
Deprecated.
Returns the minor version number.
|
int |
getPRFBlockSize()
Deprecated.
Obtains the block size of the PRF hash algorithm.
|
java.lang.String |
getPRFHashAlg()
Deprecated.
Obtains the PRF hash algorithm to use in the PRF calculation.
|
int |
getPRFHashLength()
Deprecated.
Obtains the length of the PRF hash algorithm.
|
byte[] |
getServerRandom()
Deprecated.
Returns a copy of the server's random value.
|
public TlsKeyMaterialParameterSpec(javax.crypto.SecretKey masterSecret,
int majorVersion,
int minorVersion,
byte[] clientRandom,
byte[] serverRandom,
java.lang.String cipherAlgorithm,
int cipherKeyLength,
int expandedCipherKeyLength,
int ivLength,
int macKeyLength,
java.lang.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+.java.lang.NullPointerException - if masterSecret, clientRandom,
serverRandom, or cipherAlgorithm are nulljava.lang.IllegalArgumentException - 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 negativepublic javax.crypto.SecretKey getMasterSecret()
public int getMajorVersion()
public int getMinorVersion()
public byte[] getClientRandom()
public byte[] getServerRandom()
public java.lang.String getCipherAlgorithm()
public int getCipherKeyLength()
public int getExpandedCipherKeyLength()
public int getIvLength()
public int getMacKeyLength()
public java.lang.String getPRFHashAlg()
public int getPRFHashLength()
public int getPRFBlockSize()