anon.crypto
Class MyECPublicKey
java.lang.Object
anon.crypto.AbstractPublicKey
anon.crypto.MyECPublicKey
- All Implemented Interfaces:
- IMyPublicKey, IXMLEncodable, java.io.Serializable, java.security.Key, java.security.PublicKey
public final class MyECPublicKey
- extends AbstractPublicKey
- implements IMyPublicKey
- See Also:
- Serialized Form
Fields inherited from interface java.security.PublicKey |
serialVersionUID |
Constructor Summary |
MyECPublicKey(org.bouncycastle.crypto.params.ECPublicKeyParameters params)
|
MyECPublicKey(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo spki)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.security.Key |
getEncoded |
m_Q
private org.bouncycastle.asn1.x9.X9ECPoint m_Q
m_params
private MyECParams m_params
MyECPublicKey
public MyECPublicKey(org.bouncycastle.crypto.params.ECPublicKeyParameters params)
MyECPublicKey
public MyECPublicKey(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo spki)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
equals
public boolean equals(java.lang.Object a_publicKey)
- Description copied from class:
AbstractPublicKey
- This method returns if two public keys have the same public key parameters.
- Specified by:
equals
in interface IMyPublicKey
- Specified by:
equals
in class AbstractPublicKey
- Parameters:
a_publicKey
- an other public key
- Returns:
- true if the keys have the same public key parameters; false otherwise
hashCode
public int hashCode()
- Specified by:
hashCode
in interface IMyPublicKey
- Specified by:
hashCode
in class AbstractPublicKey
- Returns:
- the public key`s hash code
- See Also:
Object.hashCode()
getAsSubjectPublicKeyInfo
public org.bouncycastle.asn1.x509.SubjectPublicKeyInfo getAsSubjectPublicKeyInfo()
- Description copied from interface:
IMyPublicKey
- Gets the key as a SubjectPublicKeyInfo object.
- Specified by:
getAsSubjectPublicKeyInfo
in interface IMyPublicKey
- Returns:
- the key as a SubjectPublicKeyInfo object
getKeyLength
public int getKeyLength()
- Description copied from interface:
IMyPublicKey
- Returns the length of the key. The length of the key often corresponds with the security it provides.
- Specified by:
getKeyLength
in interface IMyPublicKey
- Returns:
- the length of the key
getSignatureAlgorithm
public ISignatureVerificationAlgorithm getSignatureAlgorithm()
- Gets a signature algorithm object for this key.
- Specified by:
getSignatureAlgorithm
in interface IMyPublicKey
- Returns:
- a signature algorithm object for this key
getPublicParams
public org.bouncycastle.crypto.params.ECPublicKeyParameters getPublicParams()
getAlgorithm
public java.lang.String getAlgorithm()
- Specified by:
getAlgorithm
in interface java.security.Key
getFormat
public java.lang.String getFormat()
- Specified by:
getFormat
in interface java.security.Key
toXmlElement
public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
- Description copied from interface:
IXMLEncodable
- Return an element that can be appended to the document. This
Method must not change the document in any way!
- Specified by:
toXmlElement
in interface IXMLEncodable
- Parameters:
a_doc
- a document
- Returns:
- the interface as xml element
- See Also:
4050
setNamedCurveID
protected void setNamedCurveID(org.bouncycastle.asn1.DERObjectIdentifier curveIdentifier)