public class PibIdentity extends Object
| Constructor and Description |
|---|
PibIdentity(PibIdentityImpl impl)
Create a PibIdentity which uses the impl backend implementation.
|
| Modifier and Type | Method and Description |
|---|---|
PibKey |
addKey_(ByteBuffer key,
Name keyName)
Add the key.
|
PibKey |
getDefaultKey()
Get the default key of this Identity.
|
PibKey |
getKey(Name keyName)
Get the key with name keyName.
|
PibKeyContainer |
getKeys_()
Get the PibKeyContainer in the PibIdentityImpl.
|
Name |
getName() |
void |
removeKey_(Name keyName)
Remove the key with keyName and its related certificates.
|
PibKey |
setDefaultKey_(ByteBuffer key,
Name keyName)
Add a key with name keyName and set it as the default key of the identity.
|
PibKey |
setDefaultKey_(Name keyName)
Set the key with name keyName as the default key of the identity.
|
public PibIdentity(PibIdentityImpl impl)
public final Name getName()
public final PibKey getKey(Name keyName) throws Pib.Error, PibImpl.Error
keyName - The name of the key.AssertionError - if the backend implementation instance is invalid.IllegalArgumentException - if keyName does not match the identity name.Pib.Error - if the key does not exist.PibImpl.Errorpublic final PibKey getDefaultKey() throws Pib.Error, PibImpl.Error
AssertionError - if the backend implementation instance is invalid.Pib.Error - if the default key has not been set.PibImpl.Errorpublic final PibKey addKey_(ByteBuffer key, Name keyName) throws PibImpl.Error, Pib.Error
key - The public key bits. This copies the array.keyName - The name of the key. This copies the name.PibImpl.ErrorPib.Errorpublic final void removeKey_(Name keyName) throws PibImpl.Error
keyName - The name of the key.PibImpl.Errorpublic final PibKey setDefaultKey_(Name keyName) throws Pib.Error, PibImpl.Error
keyName - The name of the key. This copies the name.IllegalArgumentException - if the name of the key does not match the
identity name.Pib.Error - if the key does not exist.PibImpl.Errorpublic final PibKey setDefaultKey_(ByteBuffer key, Name keyName) throws PibImpl.Error, Pib.Error
key - The array of encoded key bytes.keyName - The name of the key, which is copied.IllegalArgumentException - if the name of the key does not match the
identity name.Pib.Error - if a key with the same name already exists.PibImpl.Errorpublic final PibKeyContainer getKeys_()
Copyright © 2019. All rights reserved.