iaik.security.ssl
Class SupportedEllipticCurves.NamedCurve

java.lang.Object
  extended by iaik.security.ssl.SupportedEllipticCurves.NamedCurve
All Implemented Interfaces:
java.lang.Cloneable
Enclosing class:
SupportedEllipticCurves

public static final class SupportedEllipticCurves.NamedCurve
extends java.lang.Object
implements java.lang.Cloneable

TLS NamedCurve.


Field Summary
protected static int ARBITRARY_EXPLICIT_CHAR2
          TLS ID for indicating support for arbitrary characteristic-2 curves.
protected static int ARBITRARY_EXPLICIT_PRIME
          TLS ID for indicating support for arbitrary prime curves.
 
Constructor Summary
SupportedEllipticCurves.NamedCurve(java.lang.String name, java.lang.String oid, int id)
          Creates a curve with the given name, oid string and id.
SupportedEllipticCurves.NamedCurve(java.lang.String name, java.lang.String oid, int id, boolean register)
          Creates a curve with the given name, oid string and id.
 
Method Summary
 java.lang.Object clone()
          Gets a clone of this NamedCurve object.
 boolean equals(java.lang.Object obj)
          Checks if this NamedCurve is equal to the given object.
 int getID()
          Gets the TLS id of this curve.
 java.lang.String getName()
          Gets the name of the curve.
 java.lang.String getOID()
          Gets the oid string of the curve.
 int hashCode()
          Gets a hash code of this NamedCurve object.
 java.lang.String toString()
          Gets a String representation of this NamedCurve.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ARBITRARY_EXPLICIT_PRIME

protected static final int ARBITRARY_EXPLICIT_PRIME
TLS ID for indicating support for arbitrary prime curves.

See Also:
Constant Field Values

ARBITRARY_EXPLICIT_CHAR2

protected static final int ARBITRARY_EXPLICIT_CHAR2
TLS ID for indicating support for arbitrary characteristic-2 curves.

See Also:
Constant Field Values
Constructor Detail

SupportedEllipticCurves.NamedCurve

public SupportedEllipticCurves.NamedCurve(java.lang.String name,
                                          java.lang.String oid,
                                          int id)
Creates a curve with the given name, oid string and id.

Parameters:
name - the name of the curve
oid - the oid string of the curve
id - the TLS id of the curve
Throws:
java.lang.IllegalArgumentException - if the given TLS id is out-of-range (not between 1 and 216-1); or name is null

SupportedEllipticCurves.NamedCurve

public SupportedEllipticCurves.NamedCurve(java.lang.String name,
                                          java.lang.String oid,
                                          int id,
                                          boolean register)
Creates a curve with the given name, oid string and id.

Parameters:
name - the name of the curve
oid - the oid string of the curve
id - the TLS id of the curve
register - whether to register the NamedCurve in the supported curves repository
Throws:
java.lang.IllegalArgumentException - if the given TLS id is out-of-range (not between 1 and 216-1); or name is null
Method Detail

getName

public java.lang.String getName()
Gets the name of the curve.

Returns:
the name of the curve (or "UNKNOWN" if the name is not known)

getOID

public java.lang.String getOID()
Gets the oid string of the curve.

Returns:
the oid string of the curve (or null if the oid not known)

getID

public int getID()
Gets the TLS id of this curve.

Returns:
the TLS id of this curve

hashCode

public int hashCode()
Gets a hash code of this NamedCurve object.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code of this NamedCurve object.

equals

public boolean equals(java.lang.Object obj)
Checks if this NamedCurve is equal to the given object.

Overrides:
equals in class java.lang.Object
Returns:
true if this NamedCurve is equal to the given object (same curve id), false if it is not equal to it

clone

public java.lang.Object clone()
Gets a clone of this NamedCurve object.

Overrides:
clone in class java.lang.Object
Returns:
a clone of this NamedCurve object

toString

public java.lang.String toString()
Gets a String representation of this NamedCurve.

Overrides:
toString in class java.lang.Object

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

iSaSiLk 5.104, (c) 2002 IAIK, (c) 2003 - 2015 SIC