Package org.conscrypt
Class XdhKeySpec
- java.lang.Object
-
- java.security.spec.EncodedKeySpec
-
- org.conscrypt.XdhKeySpec
-
- All Implemented Interfaces:
java.security.spec.KeySpec
public final class XdhKeySpec extends java.security.spec.EncodedKeySpecExternal Diffie–Hellman key spec holding a key which could be either a public or private key.Subclasses
EncodedKeySpecusing the non-Standard "raw" format. The XdhKeyFactory class utilises this in order to create XDH keys from raw bytes and to return them as an XdhKeySpec allowing the raw key material to be extracted from an XDH key.
-
-
Constructor Summary
Constructors Constructor Description XdhKeySpec(byte[] encoded)Creates an instance ofXdhKeySpecby passing a public or private key in its raw format.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetFormat()byte[]getKey()Returns the public or private key in its raw format.inthashCode()
-
-
-
Constructor Detail
-
XdhKeySpec
public XdhKeySpec(byte[] encoded)
Creates an instance ofXdhKeySpecby passing a public or private key in its raw format.
-
-
Method Detail
-
getFormat
public java.lang.String getFormat()
- Specified by:
getFormatin classjava.security.spec.EncodedKeySpec
-
getKey
public byte[] getKey()
Returns the public or private key in its raw format.- Returns:
- key in its raw format.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-