Package at.favre.lib.idmask
Class KeyManager.CachedKdfConverter
- java.lang.Object
-
- at.favre.lib.idmask.KeyManager.CachedKdfConverter
-
- All Implemented Interfaces:
KeyManager
- Enclosing interface:
- KeyManager
public static final class KeyManager.CachedKdfConverter extends Object implements KeyManager
Used as cached key derivation proxy.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
KeyManager.CachedKdfConverter.KdfConverter
Simple interface for deriving keys used inKeyManager.CachedKdfConverter
.-
Nested classes/interfaces inherited from interface at.favre.lib.idmask.KeyManager
KeyManager.CachedKdfConverter, KeyManager.Default, KeyManager.Factory, KeyManager.IdSecretKey
-
-
Field Summary
-
Fields inherited from interface at.favre.lib.idmask.KeyManager
MAX_KEY_LENGTH_BYTE, MIN_KEY_LENGTH_BYTE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clears each individual key (callsKeyManager.IdSecretKey.clear()
on every key) and removes all managed keys.KeyManager.IdSecretKey
getActiveKey()
Get current active key.int
getActiveKeyId()
Get the key id of currents active secret key.KeyManager.IdSecretKey
getById(int id)
Gets an id-key for given key id.int
size()
Size of currently managed keys including active key.
-
-
-
Method Detail
-
getById
public KeyManager.IdSecretKey getById(int id)
Description copied from interface:KeyManager
Gets an id-key for given key id.- Specified by:
getById
in interfaceKeyManager
- Parameters:
id
- to find the key by- Returns:
- key or null if not found
-
getActiveKey
public KeyManager.IdSecretKey getActiveKey()
Description copied from interface:KeyManager
Get current active key. This is the key used to encrypt new ids.- Specified by:
getActiveKey
in interfaceKeyManager
- Returns:
- active secret key
-
getActiveKeyId
public int getActiveKeyId()
Description copied from interface:KeyManager
Get the key id of currents active secret key.- Specified by:
getActiveKeyId
in interfaceKeyManager
- Returns:
- key id
-
size
public int size()
Description copied from interface:KeyManager
Size of currently managed keys including active key.- Specified by:
size
in interfaceKeyManager
- Returns:
- size of managed keys
-
clear
public void clear()
Description copied from interface:KeyManager
Clears each individual key (callsKeyManager.IdSecretKey.clear()
on every key) and removes all managed keys.- Specified by:
clear
in interfaceKeyManager
-
-