IAIK ECC
version 2.18

iaik.security.ecc.util
Class PointFormatter

java.lang.Object
  extended byiaik.security.ecc.util.PointFormatter

public class PointFormatter
extends java.lang.Object

This class is used to format EC points. This means it is responsible for the ASN.1 encoding and decoding of a point's X and Y coordinate.


Field Summary
protected  PointCoDec codec_
          The Point Encoder and Decoder.
protected  int compressionMethods_
          By default don't compress EC points.
protected static PointFormatter instance_
          The singleton instance.
 
Constructor Summary
protected PointFormatter()
          Use the static getInstance factory method.
 
Method Summary
 int getDefaultCompressionMethods()
          Returns the default compression methods used.
static PointFormatter getInstance()
          Returns an point formatter instance
 PointCoDec getPointCodec()
          Gets the codec to format the ec points.
 void setDefaultCompressionMethod(int compressionMethod)
          Sets the default compression method.
 void setPointCoDec(PointCoDec pointCodec)
          Sets the codec to be used to encode and decode ec points.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance_

protected static PointFormatter instance_
The singleton instance.


codec_

protected PointCoDec codec_
The Point Encoder and Decoder.


compressionMethods_

protected int compressionMethods_
By default don't compress EC points.

Constructor Detail

PointFormatter

protected PointFormatter()
Use the static getInstance factory method.

Method Detail

getInstance

public static PointFormatter getInstance()
Returns an point formatter instance

Returns:
the point formatter

getDefaultCompressionMethods

public int getDefaultCompressionMethods()
Returns the default compression methods used.

Returns:
the default compression methods.

getPointCodec

public PointCoDec getPointCodec()
Gets the codec to format the ec points.

Returns:
the codec implementation.

setDefaultCompressionMethod

public void setDefaultCompressionMethod(int compressionMethod)
Sets the default compression method.

Parameters:
compressionMethod -
See Also:
PointCoDec.COMPRESSED, PointCoDec.UNCOMPRESSED

setPointCoDec

public void setPointCoDec(PointCoDec pointCodec)
Sets the codec to be used to encode and decode ec points.

Parameters:
pointCodec -

IAIK ECC
version 2.18

IAIK-ECC 2.18, (c) 2002 IAIK, (c) 2003 SIC