Package org.conscrypt
Class OpenSSLECPublicKey
- java.lang.Object
-
- org.conscrypt.OpenSSLECPublicKey
-
- All Implemented Interfaces:
java.io.Serializable,java.security.interfaces.ECKey,java.security.interfaces.ECPublicKey,java.security.Key,java.security.PublicKey,OpenSSLKeyHolder
final class OpenSSLECPublicKey extends java.lang.Object implements java.security.interfaces.ECPublicKey, OpenSSLKeyHolder
An implementation of aPublicKeyfor EC keys based on BoringSSL.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringALGORITHMprotected OpenSSLECGroupContextgroupprotected OpenSSLKeykeyprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description OpenSSLECPublicKey(java.security.spec.ECPublicKeySpec ecKeySpec)OpenSSLECPublicKey(OpenSSLECGroupContext group, OpenSSLKey key)OpenSSLECPublicKey(OpenSSLKey key)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetAlgorithm()byte[]getEncoded()java.lang.StringgetFormat()(package private) static OpenSSLKeygetInstance(java.security.interfaces.ECPublicKey ecPublicKey)OpenSSLKeygetOpenSSLKey()java.security.spec.ECParameterSpecgetParams()private java.security.spec.ECPointgetPublicKey()java.security.spec.ECPointgetW()inthashCode()private voidreadObject(java.io.ObjectInputStream stream)java.lang.StringtoString()private voidwriteObject(java.io.ObjectOutputStream stream)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
ALGORITHM
private static final java.lang.String ALGORITHM
- See Also:
- Constant Field Values
-
key
protected transient OpenSSLKey key
-
group
protected transient OpenSSLECGroupContext group
-
-
Constructor Detail
-
OpenSSLECPublicKey
OpenSSLECPublicKey(OpenSSLECGroupContext group, OpenSSLKey key)
-
OpenSSLECPublicKey
OpenSSLECPublicKey(OpenSSLKey key)
-
OpenSSLECPublicKey
OpenSSLECPublicKey(java.security.spec.ECPublicKeySpec ecKeySpec) throws java.security.spec.InvalidKeySpecException- Throws:
java.security.spec.InvalidKeySpecException
-
-
Method Detail
-
getInstance
static OpenSSLKey getInstance(java.security.interfaces.ECPublicKey ecPublicKey) throws java.security.InvalidKeyException
- Throws:
java.security.InvalidKeyException
-
getAlgorithm
public java.lang.String getAlgorithm()
- Specified by:
getAlgorithmin interfacejava.security.Key
-
getFormat
public java.lang.String getFormat()
- Specified by:
getFormatin interfacejava.security.Key
-
getEncoded
public byte[] getEncoded()
- Specified by:
getEncodedin interfacejava.security.Key
-
getParams
public java.security.spec.ECParameterSpec getParams()
- Specified by:
getParamsin interfacejava.security.interfaces.ECKey
-
getPublicKey
private java.security.spec.ECPoint getPublicKey()
-
getW
public java.security.spec.ECPoint getW()
- Specified by:
getWin interfacejava.security.interfaces.ECPublicKey
-
getOpenSSLKey
public OpenSSLKey getOpenSSLKey()
- Specified by:
getOpenSSLKeyin interfaceOpenSSLKeyHolder
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
readObject
private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundException- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
writeObject
private void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOException- Throws:
java.io.IOException
-
-