Package pygar.cryptography
Interface SessionKeyStore
- All Known Implementing Classes:
KeyStoreFS
,SessionKeyStoreImpl
public interface SessionKeyStore
This interface declares methods to read and write a secret key used to conceal
session data. This kind of key is used by team/group members but is never
shared with the BAN. Implementations my use symmetric or one-way keys as
session keys but symmetric is the simpler to implement.
-
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.
-
Method Details
-
putKey
Put a key in the store at a location specified by the path.- Parameters:
sessionid
- a key is associated with a session identified here.key
- the key- Throws:
ConfigurationError
-
getKey
Retrieve a key from a store in the location given by path- Parameters:
sessionid
- a key is associated with a session identified here.- Returns:
- SecretKeySpec
- Throws:
ConfigurationError
ConfigurationError
-
newRandomKey
javax.crypto.SecretKey newRandomKey()Create a new, random session key.
-