iaik.xkms
Enum KeyUsage

Object
  extended by Enum<KeyUsage>
      extended by KeyUsage
All Implemented Interfaces:
Serializable, Comparable<KeyUsage>

public enum KeyUsage
extends Enum<KeyUsage>

KeyBinding KeyUsage constant definitions.

[175] The <KeyUsage> element specifies one or more intended uses of the key. If no <KeyUsage> is specified all uses are permitted.

[176] If a key usage is specified in a KeyBinding that the cryptographic algorithm associated with the key does not support the element MUST be ignored. If a key usage is specified in a QueryKeyBinding however the key usage forms part of the criteria the service should attempt to match.

[177] For example if a KeyBinding specifies the key usage 'Encryption' for a Digital Signature Algorithm key the relying application should ignore the key usage element. If however a client makes a request that contains a QueryKeyBinding that specifies the key usage 'Encryption' the service should not return a Digital Signature Algorithm key.


Enum Constant Summary
ENCRYPTION
          The key pair may be used for encryption and decryption.
EXCHANGE
          The key pair may be used for key exchange.
SIGNATURE
          The key pair may be used for signature and verification.
 
Method Summary
 String toString()
          Returns the String representation of this enum constant, including the namespace.
static KeyUsage valueOf(String name)
          Returns the enum constant of this type with the specified name.
static KeyUsage[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ENCRYPTION

public static final KeyUsage ENCRYPTION
The key pair may be used for encryption and decryption.


SIGNATURE

public static final KeyUsage SIGNATURE
The key pair may be used for signature and verification.


EXCHANGE

public static final KeyUsage EXCHANGE
The key pair may be used for key exchange.

Method Detail

values

public static KeyUsage[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (KeyUsage c : KeyUsage.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static KeyUsage valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

toString

public String toString()
Returns the String representation of this enum constant, including the namespace.

Overrides:
toString in class Enum<KeyUsage>
Returns:
the String representation including the namespace.