|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.avis.security.KeyScheme
public abstract class KeyScheme
An enumeration of supported Elvin security schemes. A key scheme defines a mode of sending or receiving notifications securely.
SingleKeyScheme
, the Dual
scheme is defined by an instance of DualKeyScheme
.
Each key scheme also defines a secure hash
for
generating its public keys: see the documentation on
security keys for more information on public and
private keys used in key schemes.
SHA1-Consumer
,
SHA1-Producer
and
SHA1-Dual
.
Field Summary | |
---|---|
boolean |
consumer
True of this scheme is a consumer scheme. |
int |
id
The unique ID of the scheme. |
SecureHash |
keyHash
The secure hash used in this scheme. |
String |
name
The unique, human-readable name of this scheme. |
boolean |
producer
True if this scheme is a producer scheme. |
static SingleKeyScheme |
SHA1_CONSUMER
The SHA-1 Consumer key scheme. |
static DualKeyScheme |
SHA1_DUAL
The SHA-1 Dual key scheme. |
static SingleKeyScheme |
SHA1_PRODUCER
The SHA-1 Producer key scheme. |
Method Summary | |
---|---|
boolean |
equals(Object object)
|
int |
hashCode()
|
boolean |
isDual()
True if the scheme requires dual key sets. |
Key |
publicKeyFor(Key privateKey)
Create the public (aka prime) key for a given private (aka raw) key using this scheme's hash. |
static KeyScheme |
schemeFor(int id)
Look up the scheme for a given ID. |
static Set<KeyScheme> |
schemes()
The set of all supported schemes. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final DualKeyScheme SHA1_DUAL
public static final SingleKeyScheme SHA1_PRODUCER
public static final SingleKeyScheme SHA1_CONSUMER
public final int id
public final boolean producer
public final boolean consumer
public final SecureHash keyHash
public final String name
Method Detail |
---|
public boolean isDual()
public Key publicKeyFor(Key privateKey)
public boolean equals(Object object)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public static KeyScheme schemeFor(int id) throws IllegalArgumentException
IllegalArgumentException
- if id is not a known scheme ID.public static Set<KeyScheme> schemes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |