Package pygar.zoneable
Class SessionKeyStoreImpl
java.lang.Object
pygar.zoneable.SessionKeyStoreImpl
- All Implemented Interfaces:
SessionKeyStore
public class SessionKeyStoreImpl extends java.lang.Object implements SessionKeyStore
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
keystoreJavaType
A key store is protected by encryption using one of several available methods. -
Method Summary
Modifier and Type Method Description javax.crypto.spec.SecretKeySpec
getKey(java.lang.String sessionid)
Retrieve a key from a store in the location given by pathjavax.crypto.SecretKey
newRandomKey()
Create a new, random session key.void
putKey(java.lang.String sessionid, byte[] key)
Put a key in the store at a location specified by the path.
-
Field Details
-
keystoreJavaType
public java.lang.String keystoreJavaTypeA key store is protected by encryption using one of several available methods. The default in Java is JKS. We recommend JCEKS.
-
-
Method Details
-
putKey
Description copied from interface:SessionKeyStore
Put a key in the store at a location specified by the path.- Specified by:
putKey
in interfaceSessionKeyStore
- Parameters:
sessionid
- a key is associated with a session identified here.key
- the key- Throws:
ConfigurationError
-
getKey
public javax.crypto.spec.SecretKeySpec getKey(java.lang.String sessionid) throws ConfigurationErrorDescription copied from interface:SessionKeyStore
Retrieve a key from a store in the location given by path- Specified by:
getKey
in interfaceSessionKeyStore
- Parameters:
sessionid
- a key is associated with a session identified here.- Returns:
- SecretKeySpec
- Throws:
ConfigurationError
-
newRandomKey
public javax.crypto.SecretKey newRandomKey()Description copied from interface:SessionKeyStore
Create a new, random session key.- Specified by:
newRandomKey
in interfaceSessionKeyStore
-