|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--com.ls.security.PublicKeyCache
Helper class for the living systems PKI public key caching. The whole functionality is realized static, so there is no need to instantiate a PublicKeyCache object and every component within the Virtual Machine can take advantage from the caching.
| Field Summary | |
protected static Map |
publicKeyCache
Contains a usrId or platformId (IP, Port, larsId) as key and byte-array containing the user's or platform's publicKey-certificate. |
| Constructor Summary | |
PublicKeyCache()
|
|
| Method Summary | |
static void |
cacheAdd(Map newPublicKeys)
Adds several public key certificates to the cache. |
static void |
cacheAdd(String keyID,
byte[] publicKeyCertificate)
Adds a public key certificate with the given keyID as key to the cache. |
static boolean |
cacheCheck(String keyID)
checks if the given keyID exists in the cache |
static void |
cacheClear()
empties the cache |
static byte[] |
cacheGet(String keyID)
Gets the publicKeyCertificate with the given keyID from the cache |
static HashMap |
cacheGetAll()
Gets all publicKeyCertificates stored in the cache. |
static void |
cacheRemove(String keyID)
removes the public key certificate of the given key from cache |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static Map publicKeyCache
Access to this cache needs to be synchronized!
| Constructor Detail |
public PublicKeyCache()
| Method Detail |
public static void cacheAdd(String keyID,
byte[] publicKeyCertificate)
throws IllegalArgumentException
keyID - the id to specifiy the public key certificatepublicKeyCertificate - the public key certificate to store in the cacheIllegalArgumentException - If keyID or publicKeyCertificate is null
public static void cacheAdd(Map newPublicKeys)
throws IllegalArgumentException
newPublicKeys - contains the public key certificates to addIllegalArgumentException - If the map hasn't got the correct structurepublic static boolean cacheCheck(String keyID)
keyID - the id to specifiy the public key certificate
public static byte[] cacheGet(String keyID)
throws IllegalArgumentException
keyID - the id of the wanted public key certificateIllegalArgumentException - If the keyID doesn't exist in the cachepublic static HashMap cacheGetAll()
public static void cacheClear()
public static void cacheRemove(String keyID)
keyID - id to remove
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||