public interface Smartkey
Smartkey
s are passive object. They do not update in real time, they do not perform
complex logic. Smartkeys typically want to be used or monitored in an
Observable
as that will ensure that your application is working with the
latest key information.
Modifier and Type | Method and Description |
---|---|
boolean |
canDecrypt() |
boolean |
canEncrypt() |
boolean |
canManage() |
List<Feature> |
getFeatures() |
SecretKey |
getKey() |
SecretKey |
getKeyForDecryption(int revision) |
String |
getName()
Useful for displaying in UIs.
|
List<KnownUser> |
getParticipants() |
int |
getRevision() |
String |
getUrn()
The URN for a Smartkey will never change.
|
@Nonnull String getName()
@Nonnull String getUrn()
@Nonnull SecretKey getKey() throws MetaClientException
getRevision()
MetaClientException
- if not allowed to encrypt using this keycanEncrypt()
int getRevision()
@Nonnull List<Feature> getFeatures()
@Nonnull List<KnownUser> getParticipants()
boolean canManage()
true
if this user is allowed to modify this smartkey. If false
,
attempts at modification will result in errors.boolean canEncrypt()
true
if this user is allowed to encrypt using this smartkey. If
false
, attempts to retrieve the encryption key will throw an exception.boolean canDecrypt()
true
if this user is allowed to decrypt using this smartkey. If
false
, attempts to retrieve the decryption key with throw an exception.@Nullable SecretKey getKeyForDecryption(int revision) throws MetaClientException
null
if no key is available for the given revisionMetaClientException
- if this key is not allowed to be used for decryptioncanDecrypt()