APIdia Launch Partner
Top Fields Constructors Methods
sun.security.ec

public final Class XDHPrivateKeyImpl

extends PKCS8Key
implements XECPrivateKey
Class Inheritance
All Implemented Interfaces
java.security.interfaces.XECPrivateKey, java.security.PrivateKey, javax.security.auth.Destroyable, java.security.AsymmetricKey, java.security.BinaryEncodable, java.security.Key, java.io.Serializable, java.security.interfaces.XECKey
Imports
java.io.*, java.security.interfaces.XECPrivateKey, java.util.Arrays, .Optional, java.security.*, java.security.spec.*, sun.security.pkcs.PKCS8Key, sun.security.x509.AlgorithmId, sun.security.util.*

Field Summary

Modifier and TypeField and Description
private byte[]
k

private final NamedParameterSpec
private static final long
Inherited from sun.security.pkcs.PKCS8Key:
algidencodedKeyprivKeyMaterialpubKeyEncodedV1V2

Constructor Summary

AccessConstructor and Description
pack-priv
XDHPrivateKeyImpl(XECParameters params, byte[] k)

pack-priv
XDHPrivateKeyImpl(byte[] encoded)

Method Summary

Modifier and TypeMethod and Description
public PublicKey
calculatePublicKey()

Overrides default sun.security.util.InternalPrivateKey.calculatePublicKey.

Calculates a matching public key.

pack-priv void
public String
getAlgorithm()

Overrides sun.security.pkcs.PKCS8Key.getAlgorithm.

Implements java.security.Key.getAlgorithm.

Returns the standard algorithm name for this key.

public byte[]
getK()

public AlgorithmParameterSpec
getParams()

Overrides default java.security.interfaces.XECPrivateKey.getParams, java.security.AsymmetricKey.getParams.

Returns the parameters associated with this key.

public Optional<byte[]>
getScalar()

Implements java.security.interfaces.XECPrivateKey.getScalar.

Get the scalar value encoded as an unpruned byte array.

private void
readObject(ObjectInputStream
the ObjectInputStream from which data is read
stream
)

Hides sun.security.pkcs.PKCS8Key.readObject.

Restores the state of this object from the stream.

Inherited from sun.security.pkcs.PKCS8Key:
clearequalsgetAlgorithmIdgetEncodedgetEncodedgetFormatgetPubKeyEncodedgetVersionhashCodehasPublicKeyparseKeyparseKeywriteReplace

Field Detail

kback to summary
private byte[] k
paramSpecback to summary
private final NamedParameterSpec paramSpec
Annotations
@SuppressWarnings:serial
serialVersionUIDback to summary
private static final long serialVersionUID

Hides sun.security.pkcs.PKCS8Key.serialVersionUID, java.security.PrivateKey.serialVersionUID.

Annotations
@Serial

Constructor Detail

XDHPrivateKeyImplback to summary
pack-priv XDHPrivateKeyImpl(XECParameters params, byte[] k) throws InvalidKeyException
XDHPrivateKeyImplback to summary
pack-priv XDHPrivateKeyImpl(byte[] encoded) throws InvalidKeyException

Method Detail

calculatePublicKeyback to summary
public PublicKey calculatePublicKey()

Overrides default sun.security.util.InternalPrivateKey.calculatePublicKey.

Doc from sun.security.util.InternalPrivateKey.calculatePublicKey.

Calculates a matching public key.

checkLengthback to summary
pack-priv void checkLength(XECParameters params) throws InvalidKeyException
getAlgorithmback to summary
public String getAlgorithm()

Overrides sun.security.pkcs.PKCS8Key.getAlgorithm.

Implements java.security.Key.getAlgorithm.

Doc from java.security.Key.getAlgorithm.

Returns the standard algorithm name for this key. For example, "RSA" would indicate that this key is an RSA key. See the Key Algorithms section in the Java Security Standard Algorithm Names Specification for information about standard key algorithm names.

Annotations
@Override
getKback to summary
public byte[] getK()
getParamsback to summary
public AlgorithmParameterSpec getParams()

Overrides default java.security.interfaces.XECPrivateKey.getParams, java.security.AsymmetricKey.getParams.

Doc from java.security.interfaces.XECPrivateKey.getParams.

Returns the parameters associated with this key. The parameters are optional and may be either explicitly specified or implicitly created during key pair generation.

Annotations
@Override
getScalarback to summary
public Optional<byte[]> getScalar()

Implements java.security.interfaces.XECPrivateKey.getScalar.

Doc from java.security.interfaces.XECPrivateKey.getScalar.

Get the scalar value encoded as an unpruned byte array. A new copy of the array is returned each time this method is called.

Annotations
@Override
readObjectback to summary
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException

Hides sun.security.pkcs.PKCS8Key.readObject.

Restores the state of this object from the stream.

Deserialization of this object is not supported.

Parameters
stream:ObjectInputStream

the ObjectInputStream from which data is read

Annotations
@Serial
Exceptions
IOException:
if an I/O error occurs
ClassNotFoundException:
if a serialized class cannot be loaded