FMLiveSwitchEcdsaKey Class Reference

An elliptic-curve key. More...

Instance Methods

(NSMutableData *) - getBytes
 Serializes this key to binary. More...
 
(NSString *) - getString
 Serializes this key to a string. More...
 
(bool) - hasPrivate
 Returns true if the key contains private information. More...
 
(bool) - hasPublic
 Returns true if the key contains public information. More...
 
(instancetype) - init
 
(FMLiveSwitchEcdsaNamedCurve) - namedCurve
 Gets the named curve. More...
 
(NSMutableData *) - privateKey
 Gets the private key. More...
 
(NSMutableData *) - publicKey
 Gets the public key. More...
 
(void) - setNamedCurve:
 Sets the named curve. More...
 
(void) - setPrivateKey:
 Sets the private key. More...
 
(void) - setPublicKey:
 Sets the public key. More...
 
(int) - size
 Gets the size of the key. More...
 
(FMLiveSwitchEcdsaKey *) - toPublic
 Creates a copy of this key without the private key. More...
 
(FMLiveSwitchAsymmetricKeyType) - type
 Gets the key type. More...
 

Class Methods

(FMLiveSwitchEcdsaKey *) + ecdsaKey
 
(FMLiveSwitchEcdsaKey *) + parseBuffer:isPrivate:
 Deserializes a key from binary. More...
 
(FMLiveSwitchEcdsaKey *) + parseBytes:isPrivate:
 Deserializes a key from binary. More...
 
(bool) + parseSignature:r:s:
 Parses a signature. More...
 
(FMLiveSwitchEcdsaKey *) + parseStringWithStr:
 Deserializes a key from a string. More...
 
- Class Methods inherited from FMLiveSwitchAsymmetricKey
(FMLiveSwitchAsymmetricKey *) + asymmetricKey
 
(FMLiveSwitchAsymmetricKey *) + createKeyWithKeyType:
 Creates a key. More...
 

Detailed Description

An elliptic-curve key.

Method Documentation

◆ ecdsaKey

+ (FMLiveSwitchEcdsaKey*) ecdsaKey

◆ getBytes

- (NSMutableData*) getBytes

Serializes this key to binary.

◆ getString

- (NSString*) getString

Serializes this key to a string.

◆ hasPrivate

- (bool) hasPrivate

Returns true if the key contains private information.

Implements FMLiveSwitchAsymmetricKey.

◆ hasPublic

- (bool) hasPublic

Returns true if the key contains public information.

Implements FMLiveSwitchAsymmetricKey.

◆ init

- (instancetype) init

◆ namedCurve

- (FMLiveSwitchEcdsaNamedCurve) namedCurve

Gets the named curve.

◆ parseBuffer:isPrivate:

+ (FMLiveSwitchEcdsaKey*) parseBuffer: (FMLiveSwitchDataBuffer *)  buffer
isPrivate: (bool)  isPrivate 

Deserializes a key from binary.

Parameters
bufferThe buffer.
isPrivateWhether this is a public key.

◆ parseBytes:isPrivate:

+ (FMLiveSwitchEcdsaKey*) parseBytes: (NSMutableData *)  bytes
isPrivate: (bool)  isPrivate 

Deserializes a key from binary.

Parameters
bytesThe bytes.
isPrivateWhether this is a public key.

◆ parseSignature:r:s:

+ (bool) parseSignature: (NSMutableData *)  signature
r: (NSMutableData **)  r
s: (NSMutableData **)  s 

Parses a signature.

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

◆ parseStringWithStr:

+ (FMLiveSwitchEcdsaKey*) parseStringWithStr: (NSString *)  str

Deserializes a key from a string.

Parameters
strThe string.

◆ privateKey

- (NSMutableData*) privateKey

Gets the private key.

◆ publicKey

- (NSMutableData*) publicKey

Gets the public key.

◆ setNamedCurve:

- (void) setNamedCurve: (FMLiveSwitchEcdsaNamedCurve)  value

Sets the named curve.

◆ setPrivateKey:

- (void) setPrivateKey: (NSMutableData *)  value

Sets the private key.

◆ setPublicKey:

- (void) setPublicKey: (NSMutableData *)  value

Sets the public key.

◆ size

- (int) size

Gets the size of the key.

◆ toPublic

- (FMLiveSwitchEcdsaKey*) toPublic

Creates a copy of this key without the private key.

◆ type

- (FMLiveSwitchAsymmetricKeyType) type

Gets the key type.

Implements FMLiveSwitchAsymmetricKey.