public class PibKeyImpl extends Object
| Constructor and Description |
|---|
PibKeyImpl(Name keyName,
ByteBuffer keyEncoding,
PibImpl pibImpl)
Create a PibKeyImpl with keyName.
|
PibKeyImpl(Name keyName,
PibImpl pibImpl)
Create a PibKeyImpl with keyName.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCertificate(CertificateV2 certificate)
Add the certificate.
|
CertificateV2 |
getCertificate(Name certificateName)
Get the certificate with name certificateName.
|
PibCertificateContainer |
getCertificates_()
Get the certificates_ container, which should only be used for testing.
|
CertificateV2 |
getDefaultCertificate()
Get the default certificate for this Key.
|
Name |
getIdentityName()
Get the name of the identity this key belongs to.
|
KeyType |
getKeyType()
Get the key type.
|
Name |
getName() |
Blob |
getPublicKey()
Get the public key encoding.
|
void |
removeCertificate(Name certificateName)
Remove the certificate with name certificateName.
|
CertificateV2 |
setDefaultCertificate(CertificateV2 certificate)
Add the certificate and set it as the default certificate of the key.
|
CertificateV2 |
setDefaultCertificate(Name certificateName)
Set the existing certificate with name certificateName as the default
certificate.
|
public PibKeyImpl(Name keyName, ByteBuffer keyEncoding, PibImpl pibImpl) throws PibImpl.Error
keyName - The name of the key, which is copied.keyEncoding - The buffer of encoded key bytes, which is copied.pibImpl - The Pib backend implementation.PibImpl.Errorpublic PibKeyImpl(Name keyName, PibImpl pibImpl) throws Pib.Error, PibImpl.Error
keyName - The name of the key, which is copied.pibImpl - The Pib backend implementation.Pib.Error - if the key with keyName does not exist.PibImpl.Errorpublic final Name getName()
public final Name getIdentityName()
public final KeyType getKeyType()
public final Blob getPublicKey()
public final void addCertificate(CertificateV2 certificate) throws CertificateV2.Error, PibImpl.Error
certificate - The certificate to add. This copies the object.IllegalArgumentException - if the name of the certificate does not
match the key name.CertificateV2.ErrorPibImpl.Errorpublic final void removeCertificate(Name certificateName) throws PibImpl.Error
certificateName - The name of the certificate.IllegalArgumentException - if certificateName does not match the key
name.PibImpl.Errorpublic final CertificateV2 getCertificate(Name certificateName) throws Pib.Error, PibImpl.Error
certificateName - The name of the certificate.IllegalArgumentException - if certificateName does not match the key name.Pib.Error - if the certificate does not exist.PibImpl.Errorpublic final CertificateV2 setDefaultCertificate(Name certificateName) throws Pib.Error, PibImpl.Error
certificateName - The name of the certificate.IllegalArgumentException - if certificateName does not match the key
namePib.Error - if the certificate does not exist.PibImpl.Errorpublic final CertificateV2 setDefaultCertificate(CertificateV2 certificate) throws CertificateV2.Error, PibImpl.Error, Pib.Error
certificate - The certificate to add. This copies the object.IllegalArgumentException - if the name of the certificate does not
match the key name.CertificateV2.ErrorPibImpl.ErrorPib.Errorpublic final CertificateV2 getDefaultCertificate() throws Pib.Error, PibImpl.Error
Pib.Error - if the default certificate does not exist.PibImpl.Errorpublic final PibCertificateContainer getCertificates_()
Copyright © 2019. All rights reserved.