public class ECCCertificate extends AbstractCertificate
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALGORITHM_ID |
static java.lang.String |
ANDROID_SIGNATURE_TYPE |
static java.lang.String |
SIGNATURE_TYPE |
AES_ENCRYPTION_MODE, CERTIFICATE_TYPE, DIGEST_TYPE, HMAC_ALGORITHM, RSA_ENCRYPTION_MODE
Constructor and Description |
---|
ECCCertificate(byte[] certificate)
Creates a new ECC certificate without the private key, only consisting of
the public key.
|
ECCCertificate(byte[] certificate,
byte[] privateKey)
Creates a new ECCCertificate 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.
|
boolean |
isFastKey()
Test if the ECCCertificate uses the fast implementation created from SUN (using the SECP160R1 curve)
|
createCertificate, createCertificate, decrypt, encrypt, getEndDate, getFingerprint, getStartDate, hashCode, hasPrivateKey, isValidRegardingStartAndEndDate, sign, toByteArray, toString, verifyCACertificateSignature, verifyCertificate, verifyCertificate, verifySignature
public static final java.lang.String ALGORITHM_ID
public static final java.lang.String SIGNATURE_TYPE
public static final java.lang.String ANDROID_SIGNATURE_TYPE
public ECCCertificate(byte[] certificate, byte[] privateKey) throws java.io.IOException
certificate
- The byte array containing the ECC certificateprivateKey
- The byte array containing the corresponding private key of
this ECC certificate or null if no such key existsjava.io.IOException
- If the byte array format is not compatible to the ECC
format or if another read error occurs, this exception is
thrown.public ECCCertificate(byte[] certificate) throws java.io.IOException
certificate
- The byte array containing the ECC certificatejava.io.IOException
- If the byte array format is not compatible to the ECC format
or if another read error occurs, this exception is thrown.ECCCertificate(byte[], byte[])
public 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()
AbstractCertificate
getSignature
in interface ICertificate
getSignature
in class AbstractCertificate
AbstractCertificate.getSignedPart()
public byte[] getSignedPart()
AbstractCertificate
getSignedPart
in interface ICertificate
getSignedPart
in class AbstractCertificate
public boolean isFastKey()