public interface DataSealerKeyStrategy
DataSealer
class,
this principally abstracts methods of handling key versioning moreso than actual
access to keys, by optimizing access to keys in accordance with the manner in which
key rollover is handled.
Implementations are expected to guarantee good performance for access to a current "default" key, and may offer less performance on access to non-default keys.
Modifier and Type | Method and Description |
---|---|
Pair<String,SecretKey> |
getDefaultKey()
Get the default/current key to use for new operations, returned along with an identifier for it.
|
SecretKey |
getKey(String name)
Get a specifically named key.
|
@Nonnull Pair<String,SecretKey> getDefaultKey() throws KeyException
KeyException
- if the key cannot be returned@Nonnull SecretKey getKey(@Nonnull @NotEmpty String name) throws KeyException
name
- name of the key to retrieveKeyException
- if the key cannot be returned, does not exist, etc.Copyright © 1999–2019. All rights reserved.