Package org.bouncycastle.asn1.x9
Class DHPublicKey
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.x9.DHPublicKey
- All Implemented Interfaces:
ASN1Encodable
,Encodable
X9.42 definition of a DHPublicKey
DHPublicKey ::= INTEGER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DHPublicKey
getInstance
(Object obj) Return a DHPublicKey from the passed in object.static DHPublicKey
getInstance
(ASN1TaggedObject obj, boolean explicit) Return a DHPublicKey from the passed in tagged object.getY()
Return the public value Y for the key.Return an ASN.1 primitive representation of this object.Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Constructor Details
-
DHPublicKey
Base constructor.- Parameters:
y
- the public value Y.
-
-
Method Details
-
getInstance
Return a DHPublicKey from the passed in tagged object.- Parameters:
obj
- a tagged object.explicit
- true if the contents of the object is explictly tagged, false otherwise.- Returns:
- a DHPublicKey
-
getInstance
Return a DHPublicKey from the passed in object.- Parameters:
obj
- an object for conversion or a byte[].- Returns:
- a DHPublicKey
-
getY
Return the public value Y for the key.- Returns:
- the Y value.
-
toASN1Primitive
Return an ASN.1 primitive representation of this object.- Specified by:
toASN1Primitive
in interfaceASN1Encodable
- Specified by:
toASN1Primitive
in classASN1Object
- Returns:
- an ASN1Integer.
-