fm.liveswitch.EcdsaKey Class Reference

An elliptic-curve key. More...

Public Member Functions

 EcdsaKey ()
 
byte[] getBytes ()
 Serializes this key to binary. More...
 
fm.liveswitch.EcdsaNamedCurve getNamedCurve ()
 Gets the named curve. More...
 
byte[] getPrivateKey ()
 Gets the private key. More...
 
byte[] getPublicKey ()
 Gets the public key. More...
 
int getSize ()
 Gets the size of the key. More...
 
String getString ()
 Serializes this key to a string. More...
 
fm.liveswitch.AsymmetricKeyType getType ()
 Gets the key type. More...
 
boolean hasPrivate ()
 Returns. More...
 
boolean hasPublic ()
 Returns. More...
 
void setNamedCurve (fm.liveswitch.EcdsaNamedCurve value)
 Sets the named curve. More...
 
void setPrivateKey (byte[] value)
 Sets the private key. More...
 
void setPublicKey (byte[] value)
 Sets the public key. More...
 
fm.liveswitch.EcdsaKey toPublic ()
 Creates a copy of this key without the private key. More...
 

Static Public Member Functions

static fm.liveswitch.EcdsaKey parseBuffer (fm.liveswitch.DataBuffer buffer, boolean isPrivate)
 Deserializes a key from binary. More...
 
static fm.liveswitch.EcdsaKey parseBytes (byte[] bytes, boolean isPrivate)
 Deserializes a key from binary. More...
 
static boolean parseSignature (byte[] signature, fm.liveswitch.Holder< byte[]> r, fm.liveswitch.Holder< byte[]> s)
 Parses a signature. More...
 
static fm.liveswitch.EcdsaKey parseString (String str)
 Deserializes a key from a string. More...
 
- Static Public Member Functions inherited from fm.liveswitch.AsymmetricKey
static fm.liveswitch.AsymmetricKey createKey (fm.liveswitch.AsymmetricKeyType keyType)
 Creates a key. More...
 

Additional Inherited Members

- Protected Member Functions inherited from fm.liveswitch.AsymmetricKey
 AsymmetricKey ()
 

Detailed Description

An elliptic-curve key.

Constructor & Destructor Documentation

◆ EcdsaKey()

fm.liveswitch.EcdsaKey.EcdsaKey ( )

Member Function Documentation

◆ getBytes()

byte [] fm.liveswitch.EcdsaKey.getBytes ( )

Serializes this key to binary.

◆ getNamedCurve()

fm.liveswitch.EcdsaNamedCurve fm.liveswitch.EcdsaKey.getNamedCurve ( )

Gets the named curve.

◆ getPrivateKey()

byte [] fm.liveswitch.EcdsaKey.getPrivateKey ( )

Gets the private key.

◆ getPublicKey()

byte [] fm.liveswitch.EcdsaKey.getPublicKey ( )

Gets the public key.

◆ getSize()

int fm.liveswitch.EcdsaKey.getSize ( )

Gets the size of the key.

◆ getString()

String fm.liveswitch.EcdsaKey.getString ( )

Serializes this key to a string.

◆ getType()

fm.liveswitch.AsymmetricKeyType fm.liveswitch.EcdsaKey.getType ( )

Gets the key type.

Reimplemented from fm.liveswitch.AsymmetricKey.

◆ hasPrivate()

boolean fm.liveswitch.EcdsaKey.hasPrivate ( )

Returns.

true

if the key contains private information.

Reimplemented from fm.liveswitch.AsymmetricKey.

◆ hasPublic()

boolean fm.liveswitch.EcdsaKey.hasPublic ( )

Returns.

true

if the key contains public information.

Reimplemented from fm.liveswitch.AsymmetricKey.

◆ parseBuffer()

static fm.liveswitch.EcdsaKey fm.liveswitch.EcdsaKey.parseBuffer ( fm.liveswitch.DataBuffer  buffer,
boolean  isPrivate 
)
static

Deserializes a key from binary.

Parameters
bufferThe buffer.
isPrivateWhether this is a public key.

◆ parseBytes()

static fm.liveswitch.EcdsaKey fm.liveswitch.EcdsaKey.parseBytes ( byte[]  bytes,
boolean  isPrivate 
)
static

Deserializes a key from binary.

Parameters
bytesThe bytes.
isPrivateWhether this is a public key.

◆ parseSignature()

static boolean fm.liveswitch.EcdsaKey.parseSignature ( byte[]  signature,
fm.liveswitch.Holder< byte[]>  r,
fm.liveswitch.Holder< byte[]>  s 
)
static

Parses a signature.

Parameters
signatureThe signature.
rThe R value.
sThe S value.

◆ parseString()

static fm.liveswitch.EcdsaKey fm.liveswitch.EcdsaKey.parseString ( String  str)
static

Deserializes a key from a string.

Parameters
strThe string.

◆ setNamedCurve()

void fm.liveswitch.EcdsaKey.setNamedCurve ( fm.liveswitch.EcdsaNamedCurve  value)

Sets the named curve.

◆ setPrivateKey()

void fm.liveswitch.EcdsaKey.setPrivateKey ( byte[]  value)

Sets the private key.

◆ setPublicKey()

void fm.liveswitch.EcdsaKey.setPublicKey ( byte[]  value)

Sets the public key.

◆ toPublic()

fm.liveswitch.EcdsaKey fm.liveswitch.EcdsaKey.toPublic ( )

Creates a copy of this key without the private key.