APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.internal.spec

public Class TlsKeyMaterialSpec

extends Object
implements KeySpec, SecretKey
Class Inheritance
All Implemented Interfaces
javax.crypto.SecretKey, javax.security.auth.Destroyable, java.security.Key, java.io.Serializable, java.security.spec.KeySpec
Annotations
@Deprecated
Imports
java.security.spec.KeySpec, javax.crypto.SecretKey, javax.crypto.spec.IvParameterSpec

Deprecated

Sun JDK internal use only --- WILL BE REMOVED in a future release.

KeySpec class for SSL/TLS key material.

Instances of this class are returned by the generateKey() method of KeyGenerators of the type "TlsKeyMaterial". Instances of this class are immutable.

Author
Andreas Sterbenz
Since
1.6

Field Summary

Modifier and TypeField and Description
private final SecretKey
private final IvParameterSpec
private final SecretKey
pack-priv static final long
private final SecretKey
private final IvParameterSpec
private final SecretKey

Constructor Summary

AccessConstructor and Description
public
TlsKeyMaterialSpec(SecretKey
the client MAC key (or null)
clientMacKey
,
SecretKey
the server MAC key (or null)
serverMacKey
)

Constructs a new TlsKeymaterialSpec from the client and server MAC keys.

public
TlsKeyMaterialSpec(SecretKey
the client MAC key (or null)
clientMacKey
,
SecretKey
the server MAC key (or null)
serverMacKey
,
SecretKey
the client cipher key (or null)
clientCipherKey
,
SecretKey
the server cipher key (or null)
serverCipherKey
)

Constructs a new TlsKeymaterialSpec from the client and server MAC keys and client and server cipher keys.

public
TlsKeyMaterialSpec(SecretKey
the client MAC key (or null)
clientMacKey
,
SecretKey
the server MAC key (or null)
serverMacKey
,
SecretKey
the client cipher key (or null)
clientCipherKey
,
IvParameterSpec
the client initialization vector (or null)
clientIv
,
SecretKey
the server cipher key (or null)
serverCipherKey
,
IvParameterSpec
the server initialization vector (or null)
serverIv
)

Constructs a new TlsKeymaterialSpec from the client and server MAC keys, client and server cipher keys, and client and server initialization vectors.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

TlsKeyMaterial.
getAlgorithm
()

Implements java.security.Key.getAlgorithm.

Returns TlsKeyMaterial.

public SecretKey

Returns:

the client cipher key (or null).
getClientCipherKey
()

Return the client cipher key (or null).

public IvParameterSpec

Returns:

the client initialization vector (or null).
getClientIv
()

Return the client initialization vector (or null).

public SecretKey

Returns:

the client MAC key (or null).
getClientMacKey
()

Returns the client MAC key.

public byte[]

Returns:

null because keys of this type have no encoding.
getEncoded
()

Implements java.security.Key.getEncoded.

Returns null because keys of this type have no encoding.

public String

Returns:

null because keys of this type have no encoding.
getFormat
()

Implements java.security.Key.getFormat.

Returns null because keys of this type have no encoding.

public SecretKey

Returns:

the server cipher key (or null).
getServerCipherKey
()

Return the server cipher key (or null).

public IvParameterSpec

Returns:

the server initialization vector (or null).
getServerIv
()

Return the server initialization vector (or null).

public SecretKey

Returns:

the server MAC key (or null).
getServerMacKey
()

Return the server MAC key.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clientCipherKeyback to summary
private final SecretKey clientCipherKey
clientIvback to summary
private final IvParameterSpec clientIv
Annotations
@SuppressWarnings:serial
clientMacKeyback to summary
private final SecretKey clientMacKey
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides javax.crypto.SecretKey.serialVersionUID.

Annotations
@Serial
serverCipherKeyback to summary
private final SecretKey serverCipherKey
serverIvback to summary
private final IvParameterSpec serverIv
Annotations
@SuppressWarnings:serial
serverMacKeyback to summary
private final SecretKey serverMacKey

Constructor Detail

TlsKeyMaterialSpecback to summary
public TlsKeyMaterialSpec(SecretKey clientMacKey, SecretKey serverMacKey)

Constructs a new TlsKeymaterialSpec from the client and server MAC keys. This call is equivalent to new TlsKeymaterialSpec(clientMacKey, serverMacKey, null, null, null, null).

Parameters
clientMacKey:SecretKey

the client MAC key (or null)

serverMacKey:SecretKey

the server MAC key (or null)

TlsKeyMaterialSpecback to summary
public TlsKeyMaterialSpec(SecretKey clientMacKey, SecretKey serverMacKey, SecretKey clientCipherKey, SecretKey serverCipherKey)

Constructs a new TlsKeymaterialSpec from the client and server MAC keys and client and server cipher keys. This call is equivalent to new TlsKeymaterialSpec(clientMacKey, serverMacKey, clientCipherKey, serverCipherKey, null, null).

Parameters
clientMacKey:SecretKey

the client MAC key (or null)

serverMacKey:SecretKey

the server MAC key (or null)

clientCipherKey:SecretKey

the client cipher key (or null)

serverCipherKey:SecretKey

the server cipher key (or null)

TlsKeyMaterialSpecback to summary
public TlsKeyMaterialSpec(SecretKey clientMacKey, SecretKey serverMacKey, SecretKey clientCipherKey, IvParameterSpec clientIv, SecretKey serverCipherKey, IvParameterSpec serverIv)

Constructs a new TlsKeymaterialSpec from the client and server MAC keys, client and server cipher keys, and client and server initialization vectors.

Parameters
clientMacKey:SecretKey

the client MAC key (or null)

serverMacKey:SecretKey

the server MAC key (or null)

clientCipherKey:SecretKey

the client cipher key (or null)

clientIv:IvParameterSpec

the client initialization vector (or null)

serverCipherKey:SecretKey

the server cipher key (or null)

serverIv:IvParameterSpec

the server initialization vector (or null)

Method Detail

getAlgorithmback to summary
public String getAlgorithm()

Implements java.security.Key.getAlgorithm.

Returns TlsKeyMaterial.

Returns:String

TlsKeyMaterial.

getClientCipherKeyback to summary
public SecretKey getClientCipherKey()

Return the client cipher key (or null).

Returns:SecretKey

the client cipher key (or null).

getClientIvback to summary
public IvParameterSpec getClientIv()

Return the client initialization vector (or null).

Returns:IvParameterSpec

the client initialization vector (or null).

getClientMacKeyback to summary
public SecretKey getClientMacKey()

Returns the client MAC key.

Returns:SecretKey

the client MAC key (or null).

getEncodedback to summary
public byte[] getEncoded()

Implements java.security.Key.getEncoded.

Returns null because keys of this type have no encoding.

Returns:byte[]

null because keys of this type have no encoding.

getFormatback to summary
public String getFormat()

Implements java.security.Key.getFormat.

Returns null because keys of this type have no encoding.

Returns:String

null because keys of this type have no encoding.

getServerCipherKeyback to summary
public SecretKey getServerCipherKey()

Return the server cipher key (or null).

Returns:SecretKey

the server cipher key (or null).

getServerIvback to summary
public IvParameterSpec getServerIv()

Return the server initialization vector (or null).

Returns:IvParameterSpec

the server initialization vector (or null).

getServerMacKeyback to summary
public SecretKey getServerMacKey()

Return the server MAC key.

Returns:SecretKey

the server MAC key (or null).