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.StringkeystoreJavaTypeA key store is protected by encryption using one of several available methods. -
Method Summary
Modifier and Type Method Description javax.crypto.spec.SecretKeySpecgetKey(java.lang.String sessionid)Retrieve a key from a store in the location given by pathjavax.crypto.SecretKeynewRandomKey()Create a new, random session key.voidputKey(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:SessionKeyStorePut a key in the store at a location specified by the path.- Specified by:
putKeyin 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:SessionKeyStoreRetrieve a key from a store in the location given by path- Specified by:
getKeyin 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:SessionKeyStoreCreate a new, random session key.- Specified by:
newRandomKeyin interfaceSessionKeyStore
-