Serializable, DataStructurepublic class KeyCertificate extends Certificate
| Modifier and Type | Field | Description |
|---|---|---|
(package private) static byte[] |
ECDSA256_PAYLOAD |
|
(package private) static byte[] |
Ed25519_PAYLOAD |
|
static KeyCertificate |
ELG_ECDSA256_CERT |
An immutable ElG/ECDSA-P256 certificate.
|
static KeyCertificate |
ELG_Ed25519_CERT |
An immutable ElG/Ed25519 certificate.
|
static int |
HEADER_LENGTH |
_payload, _type, CERTIFICATE_LENGTH_SIGNED_WITH_HASH, CERTIFICATE_TYPE_HASHCASH, CERTIFICATE_TYPE_HIDDEN, CERTIFICATE_TYPE_KEY, CERTIFICATE_TYPE_MULTIPLE, CERTIFICATE_TYPE_NULL, CERTIFICATE_TYPE_SIGNED, NULL_CERT| Constructor | Description |
|---|---|
KeyCertificate(byte[] payload) |
|
KeyCertificate(SigType type) |
A KeyCertificate with crypto type 0 (ElGamal)
and the signature type as specified.
|
KeyCertificate(Certificate cert) |
Up-convert a cert to this class
|
KeyCertificate(SigningPublicKey spk) |
A KeyCertificate with crypto type 0 (ElGamal)
and the signature type and extra data from the given public key.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
getCryptoTypeCode() |
|
byte[] |
getExtraKeyData() |
Signing Key extra data, if any, is first in the array.
|
byte[] |
getExtraSigningKeyData() |
Signing Key extra data, if any.
|
SigType |
getSigType() |
|
int |
getSigTypeCode() |
|
KeyCertificate |
toKeyCertificate() |
Up-convert this to a KeyCertificate
|
String |
toString() |
create, create, equals, getCertificateType, getPayload, hashCode, readBytes, readBytes, setCertificateType, setPayload, size, writeBytes, writeBytescalculateHash, fromBase64, fromByteArray, read, toBase64, toByteArraypublic static final int HEADER_LENGTH
static final byte[] Ed25519_PAYLOAD
static final byte[] ECDSA256_PAYLOAD
public static final KeyCertificate ELG_ECDSA256_CERT
public static final KeyCertificate ELG_Ed25519_CERT
public KeyCertificate(byte[] payload)
throws DataFormatException
payload - 4 bytes minimum if non-nullDataFormatExceptionpublic KeyCertificate(SigningPublicKey spk)
spk - non-null data non-nullIllegalArgumentExceptionpublic KeyCertificate(SigType type)
type - non-nullIllegalArgumentExceptionpublic KeyCertificate(Certificate cert) throws DataFormatException
cert - payload 4 bytes minimum if non-nullDataFormatException - if cert type != CERTIFICATE_TYPE_KEYpublic int getSigTypeCode()
public int getCryptoTypeCode()
public SigType getSigType()
public byte[] getExtraKeyData()
public byte[] getExtraSigningKeyData()
UnsupportedOperationException - if the sig type is unsupportedpublic KeyCertificate toKeyCertificate()
CertificatetoKeyCertificate in class Certificatepublic String toString()
toString in class Certificate