public class RSACertificate extends AbstractCertificate
AES_ENCRYPTION_MODE, CERTIFICATE_TYPE, DIGEST_TYPE, HMAC_ALGORITHM, RSA_ENCRYPTION_MODE
Constructor and Description |
---|
RSACertificate(byte[] certificate)
Creates a new RSACertificate from a byte array.
|
RSACertificate(byte[] certificateBytes,
byte[] privateKey)
Creates a RSA certificate from a byte array.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Every certificate type has to implement a comparison operator.
|
java.lang.String |
getIssuer()
Get the issuer of the certificate
|
IPrivateKey |
getPrivateKey()
Get the private key of the certificate
|
IPublicKey |
getPublicKey()
Get the public key of the certificate
|
byte[] |
getSignature()
Get the signature of the issuer of this certificate.
|
byte[] |
getSignedPart()
Returns the part of the certificate, that was signed by the issuer.
|
java.lang.String |
getSubject()
Get the subject of the certificate.
|
createCertificate, createCertificate, decrypt, encrypt, getEndDate, getFingerprint, getStartDate, hashCode, hasPrivateKey, isValidRegardingStartAndEndDate, sign, toByteArray, toString, verifyCACertificateSignature, verifyCertificate, verifyCertificate, verifySignature
public RSACertificate(byte[] certificate) throws java.io.IOException
certificate
- The byte array containing the certificatejava.io.IOException
- If the certificate could not be created, an exception will be thrownpublic RSACertificate(byte[] certificateBytes, byte[] privateKey) throws java.io.IOException
certificateBytes
- The certificate in a byte arrayprivateKey
- The private key in a byte array or null, if no private key existsjava.io.IOException
- If the certificate could not be created, an exception will be thrownpublic java.lang.String getIssuer()
AbstractCertificate
getIssuer
in interface ICertificate
getIssuer
in class AbstractCertificate
public java.lang.String getSubject()
AbstractCertificate
getSubject
in interface ICertificate
getSubject
in class AbstractCertificate
public IPrivateKey getPrivateKey()
AbstractCertificate
public IPublicKey getPublicKey()
AbstractCertificate
getPublicKey
in interface ICertificate
getPublicKey
in class AbstractCertificate
public boolean equals(java.lang.Object obj)
AbstractCertificate
equals
in interface ICertificate
equals
in class AbstractCertificate
obj
- The object of the type CertificateAbstraction that should be compared to the current certificateObject.equals(java.lang.Object)
public byte[] getSignature()
getSignature
in interface ICertificate
getSignature
in class AbstractCertificate
AbstractCertificate.getSignedPart()
public byte[] getSignedPart()
getSignedPart
in interface ICertificate
getSignedPart
in class AbstractCertificate