|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jason.client.KeyStore
Title: Javacards As Secure Object Network
Description: KeyStore to be used on a client side computer
Copyright: Copyright (c) 2002
Company: University of Twente
Field Summary | |
protected static java.lang.String[] |
algorithmNames
List of all supported algorithm names |
protected static byte[] |
algorithmValues
List of all supported algorithm types |
protected java.util.Hashtable |
freshnessCounters
|
protected java.util.Hashtable |
keys
Mapping between role byte and Key |
protected java.util.Hashtable |
sessionAlgorithms
Mapping between role byte and the name of the corresponding session algorithm name |
Constructor Summary | |
KeyStore()
Initializes a new KeyStore. |
Method Summary | |
static byte |
algorithmNameToValue(java.lang.String algorithmName)
Mapping between algorithm names and its value |
static java.lang.String |
algorithmValueToName(byte algorithmValue)
Mapping between the value of an algorithm and it's name. |
private static java.lang.String |
arrayToString(byte[] data)
|
byte |
getAlgorithmValue(byte role)
Gets the algorithm value of the key associated with the given role. |
byte |
getFreshnessCounter(byte role)
Gets the freshness counter for the specified role. |
java.security.Key |
getKey(byte role)
Gets the Key corresponding to the role. |
java.lang.String |
getSessionAlgorithmName(byte role)
Gets the algorithm name of the session key that should be used when logging in as the specified role. |
byte |
getSessionAlgorithmValue(byte role)
Gets the algorithm value of the session key that should be used when logging in as the specified role. |
void |
increaseFreshnessCounter(byte role)
Increases the freshness counter for the specified role. |
static KeyStore |
load(java.io.InputStream input)
Loads the key store from an InputStream. |
void |
setKey(byte role,
java.security.Key key,
java.lang.String sessionAlgorithm)
Sets a new key. |
void |
show()
Shows the contents of the keystore. |
void |
store(java.io.OutputStream output)
Stores the key store to an OutputStream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String[] algorithmNames
protected static final byte[] algorithmValues
protected java.util.Hashtable keys
protected java.util.Hashtable sessionAlgorithms
protected java.util.Hashtable freshnessCounters
Constructor Detail |
public KeyStore()
Method Detail |
public java.security.Key getKey(byte role)
role
- Role byte
public void setKey(byte role, java.security.Key key, java.lang.String sessionAlgorithm)
role
- Role bytekey
- The keysessionAlgorithm
- The name of the algorithm used encrypting the whole sessionpublic static byte algorithmNameToValue(java.lang.String algorithmName)
algorithmName
- The name of the algorithm
public static java.lang.String algorithmValueToName(byte algorithmValue)
algorithmValue
- The value of the algorithm
public byte getAlgorithmValue(byte role)
role
- The role byte
public java.lang.String getSessionAlgorithmName(byte role)
role
- The role byte
public byte getSessionAlgorithmValue(byte role)
role
- The role byte
public void increaseFreshnessCounter(byte role)
role
- public byte getFreshnessCounter(byte role)
role
- The role byte for which the freshness counter is requested
public static KeyStore load(java.io.InputStream input) throws java.io.IOException
input
- The inputstream
java.io.IOException
- when the input stream cannot be read frompublic void store(java.io.OutputStream output) throws java.io.IOException
output
- The outputstream
java.io.IOException
- when the output stream cannot be written topublic void show()
private static java.lang.String arrayToString(byte[] data)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |