FMLiveSwitchRsaKey Class Reference

An RSA key. More...

Instance Methods

(NSMutableData *) - coefficient
 Gets the private value inverse-Q. More...
 
(NSMutableData *) - exponent1
 Gets the private value DP. More...
 
(NSMutableData *) - exponent2
 Gets the private value DQ. More...
 
(NSMutableData *) - getBytes
 Serializes this key to binary. 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
 
(NSMutableData *) - modulus
 Gets the public value N. More...
 
(NSMutableData *) - prime1
 Gets the private value P. More...
 
(NSMutableData *) - prime2
 Gets the private value Q. More...
 
(NSMutableData *) - privateExponent
 Gets the private value D. More...
 
(NSMutableData *) - publicExponent
 Gets the public value E. More...
 
(void) - setCoefficient:
 Sets the private value inverse-Q. More...
 
(void) - setExponent1:
 Sets the private value DP. More...
 
(void) - setExponent2:
 Sets the private value DQ. More...
 
(void) - setModulus:
 Sets the public value N. More...
 
(void) - setPrime1:
 Sets the private value P. More...
 
(void) - setPrime2:
 Sets the private value Q. More...
 
(void) - setPrivateExponent:
 Sets the private value D. More...
 
(void) - setPublicExponent:
 Sets the public value E. More...
 
(int) - size
 Gets the size of the key. More...
 
(FMLiveSwitchAsymmetricKeyType) - type
 Gets the key type. More...
 

Class Methods

(FMLiveSwitchRsaKey *) + parseBuffer:
 Deserializes a key from binary. More...
 
(FMLiveSwitchRsaKey *) + parseBytes:
 Deserializes a key from binary. More...
 
(FMLiveSwitchRsaKey *) + rsaKey
 
- Class Methods inherited from FMLiveSwitchAsymmetricKey
(FMLiveSwitchAsymmetricKey *) + asymmetricKey
 
(FMLiveSwitchAsymmetricKey *) + createKeyWithKeyType:
 Creates a key. More...
 

Detailed Description

An RSA key.

Method Documentation

◆ coefficient

- (NSMutableData*) coefficient

Gets the private value inverse-Q.

◆ exponent1

- (NSMutableData*) exponent1

Gets the private value DP.

◆ exponent2

- (NSMutableData*) exponent2

Gets the private value DQ.

◆ getBytes

- (NSMutableData*) getBytes

Serializes this key to binary.

◆ 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

◆ modulus

- (NSMutableData*) modulus

Gets the public value N.

◆ parseBuffer:

+ (FMLiveSwitchRsaKey*) parseBuffer: (FMLiveSwitchDataBuffer *)  buffer

Deserializes a key from binary.

Parameters
bufferThe buffer.

◆ parseBytes:

+ (FMLiveSwitchRsaKey*) parseBytes: (NSMutableData *)  bytes

Deserializes a key from binary.

Parameters
bytesThe bytes.

◆ prime1

- (NSMutableData*) prime1

Gets the private value P.

◆ prime2

- (NSMutableData*) prime2

Gets the private value Q.

◆ privateExponent

- (NSMutableData*) privateExponent

Gets the private value D.

◆ publicExponent

- (NSMutableData*) publicExponent

Gets the public value E.

◆ rsaKey

+ (FMLiveSwitchRsaKey*) rsaKey

◆ setCoefficient:

- (void) setCoefficient: (NSMutableData *)  value

Sets the private value inverse-Q.

◆ setExponent1:

- (void) setExponent1: (NSMutableData *)  value

Sets the private value DP.

◆ setExponent2:

- (void) setExponent2: (NSMutableData *)  value

Sets the private value DQ.

◆ setModulus:

- (void) setModulus: (NSMutableData *)  value

Sets the public value N.

◆ setPrime1:

- (void) setPrime1: (NSMutableData *)  value

Sets the private value P.

◆ setPrime2:

- (void) setPrime2: (NSMutableData *)  value

Sets the private value Q.

◆ setPrivateExponent:

- (void) setPrivateExponent: (NSMutableData *)  value

Sets the private value D.

◆ setPublicExponent:

- (void) setPublicExponent: (NSMutableData *)  value

Sets the public value E.

◆ size

- (int) size

Gets the size of the key.

◆ type

- (FMLiveSwitchAsymmetricKeyType) type

Gets the key type.

Implements FMLiveSwitchAsymmetricKey.