public final class MyRSAPublicKey extends AbstractPublicKey implements IMyPublicKey
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_LANGUAGE, XML_ATTR_VERSION
Constructor and Description |
---|
MyRSAPublicKey(java.math.BigInteger modulus,
java.math.BigInteger exponent) |
MyRSAPublicKey(mybouncycastle.org.bouncycastle.crypto.CipherParameters cipherparams) |
MyRSAPublicKey(mybouncycastle.org.bouncycastle.asn1.x509.RSAPublicKeyStructure en) |
MyRSAPublicKey(mybouncycastle.org.bouncycastle.asn1.x509.SubjectPublicKeyInfo info) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object a_publicKey)
This method returns if two public keys have the same public key parameters.
|
java.lang.String |
getAlgorithm() |
mybouncycastle.org.bouncycastle.asn1.x509.SubjectPublicKeyInfo |
getAsSubjectPublicKeyInfo()
Gets the key as a SubjectPublicKeyInfo object.
|
java.lang.String |
getFormat() |
static MyRSAPublicKey |
getInstance(byte[] encoded) |
int |
getKeyLength()
Returns the length of the key.
|
java.math.BigInteger |
getModulus() |
mybouncycastle.org.bouncycastle.crypto.CipherParameters |
getParams() |
java.math.BigInteger |
getPublicExponent() |
ISignatureVerificationAlgorithm |
getSignatureAlgorithm()
Gets the signature algorithm object that is held and initialised by this key.
|
int |
hashCode() |
java.lang.String |
toString() |
org.w3c.dom.Element |
toXmlElement(org.w3c.dom.Document a_doc)
Builds an XML Node containing the public key data.
|
getEncoded
public MyRSAPublicKey(java.math.BigInteger modulus, java.math.BigInteger exponent)
public MyRSAPublicKey(mybouncycastle.org.bouncycastle.crypto.CipherParameters cipherparams) throws java.lang.Exception
java.lang.Exception
public MyRSAPublicKey(mybouncycastle.org.bouncycastle.asn1.x509.RSAPublicKeyStructure en) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public MyRSAPublicKey(mybouncycastle.org.bouncycastle.asn1.x509.SubjectPublicKeyInfo info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static MyRSAPublicKey getInstance(byte[] encoded)
public ISignatureVerificationAlgorithm getSignatureAlgorithm()
getSignatureAlgorithm
in interface IMyPublicKey
public java.math.BigInteger getModulus()
public java.math.BigInteger getPublicExponent()
public java.lang.String getAlgorithm()
getAlgorithm
in interface java.security.Key
public java.lang.String getFormat()
getFormat
in interface java.security.Key
public int getKeyLength()
IMyPublicKey
getKeyLength
in interface IMyPublicKey
public mybouncycastle.org.bouncycastle.asn1.x509.SubjectPublicKeyInfo getAsSubjectPublicKeyInfo()
IMyPublicKey
getAsSubjectPublicKeyInfo
in interface IMyPublicKey
public mybouncycastle.org.bouncycastle.crypto.CipherParameters getParams()
public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
toXmlElement
in interface IXMLEncodable
a_doc
- the root documentpublic boolean equals(java.lang.Object a_publicKey)
equals
in interface IMyPublicKey
equals
in class AbstractPublicKey
a_publicKey
- an other public keypublic int hashCode()
hashCode
in interface IMyPublicKey
hashCode
in class AbstractPublicKey
Object.hashCode()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2023. All rights reserved.