Package com.unboundid.util.ssl.cert
Class EllipticCurvePublicKey
java.lang.Object
com.unboundid.util.ssl.cert.DecodedPublicKey
com.unboundid.util.ssl.cert.EllipticCurvePublicKey
- All Implemented Interfaces:
Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class EllipticCurvePublicKey
extends DecodedPublicKey
This class provides a data structure for representing the information
contained in an elliptic curve public key in an X.509 certificate. As per
RFC 5480 section 2.2,
and the Standards for Efficient Cryptography SEC 1 document.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the value of the x coordinate.Retrieves the value of the y coordinate.voidtoString(StringBuilder buffer) Appends a string representation of this decoded public key to the provided buffer.booleanIndicates whether the public key uses the compressed form (which merely contains the x coordinate and an indication as to whether the y coordinate is even or odd) or the uncompressed form (which contains both the x and y coordinate values).booleanIndicates whether the y coordinate is even or odd.Methods inherited from class com.unboundid.util.ssl.cert.DecodedPublicKey
toString
-
Method Details
-
usesCompressedForm
Indicates whether the public key uses the compressed form (which merely contains the x coordinate and an indication as to whether the y coordinate is even or odd) or the uncompressed form (which contains both the x and y coordinate values).- Returns:
trueif the public key uses the compressed form, orfalseif it uses the uncompressed form.
-
getXCoordinate
Retrieves the value of the x coordinate. This will always be available.- Returns:
- The value of the x coordinate.
-
getYCoordinate
Retrieves the value of the y coordinate. This will only be available if the key was encoded in the uncompressed form.- Returns:
- The value of the y coordinate, or
nullif the key was encoded in the compressed form.
-
yCoordinateIsEven
Indicates whether the y coordinate is even or odd.- Returns:
trueif the y coordinate is even, orfalseif the y coordinate is odd.
-
toString
Appends a string representation of this decoded public key to the provided buffer.- Specified by:
toStringin classDecodedPublicKey- Parameters:
buffer- The buffer to which the information should be appended.
-