public class TlcpSM2PremasterSecretParameterSpec
extends java.lang.Object
implements java.security.spec.AlgorithmParameterSpec
| Constructor and Description |
|---|
TlcpSM2PremasterSecretParameterSpec(int clientVersion,
int serverVersion)
Constructs a new TlcpSM2PremasterSecretParameterSpec.
|
TlcpSM2PremasterSecretParameterSpec(int clientVersion,
int serverVersion,
byte[] encodedSecret)
Constructs a new TlcpSM2PremasterSecretParameterSpec.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getClientVersion()
Returns the version of the TLS protocol by which the client wishes to
communicate during this session.
|
byte[] |
getEncodedSecret()
Returns the encoded secret.
|
int |
getMajorVersion()
Returns the major version used in SM2 premaster secret.
|
int |
getMinorVersion()
Returns the minor version used in SM2 premaster secret.
|
int |
getServerVersion()
Returns the negotiated version of the TLS protocol which contains the
lower of that suggested by the client in the client hello and the
highest supported by the server.
|
public TlcpSM2PremasterSecretParameterSpec(int clientVersion,
int serverVersion)
clientVersion - the version of the TLS protocol by which the
client wishes to communicate during this sessionserverVersion - the negotiated version of the TLS protocol which
contains the lower of that suggested by the client in the client
hello and the highest supported by the server.java.lang.IllegalArgumentException - if clientVersion or serverVersion are
negative or larger than (2^16 - 1)public TlcpSM2PremasterSecretParameterSpec(int clientVersion,
int serverVersion,
byte[] encodedSecret)
clientVersion - the version of the TLS protocol by which the
client wishes to communicate during this sessionserverVersion - the negotiated version of the TLS protocol which
contains the lower of that suggested by the client in the client
hello and the highest supported by the server.encodedSecret - the encoded secret keyjava.lang.IllegalArgumentException - if clientVersion or serverVersion are
negative or larger than (2^16 - 1) or if encodedSecret is not
exactly 48 bytespublic int getClientVersion()
public int getServerVersion()
public int getMajorVersion()
public int getMinorVersion()
public byte[] getEncodedSecret()