SCM iOS API
Key Class Reference

Class describes a key object. Inherits from TokenObject. More...

Inheritance diagram for Key:
TokenObject PrivateKey PublicKey

Instance Methods

(NSString *) - getKeyType
 
(NSString *) - getAlgorithmName
 
(NSUInteger) - getkeyLength
 
(void) - getModulus:
 
(void) - getPublicExponent:
 
- Instance Methods inherited from TokenObject
(NSString *) - getType
 
(NSString *) - getCkLabel
 
(NSString *) - getCkId
 
(Token *) - getParent
 
(NSUInteger) - getPinNumber
 

Detailed Description

Class describes a key object. Inherits from TokenObject.

Note that the constructor is not intended to be called by user code. Such objects are constructed internally by the API.

Method Documentation

◆ getAlgorithmName()

- (NSString *) getAlgorithmName

Gets the algorithm of the key. The only possible value is currently "RSA".

Returns
the algorithm of the key.

◆ getkeyLength()

- (NSUInteger) getkeyLength

Gets the key length, in bits.

Returns
the key length.

◆ getKeyType()

- (NSString *) getKeyType

Gets string identifying the type of the key. The possible values are :

  • "publicKey"
  • "privateKey"
Returns
the key type.

◆ getModulus:()

- (void) getModulus: (void(^)(NSData *modulus, NSError *error))  completionHandler

Gets the modulus.

Parameters
completionHandlerthe completion handler block to be called as soon as the modulus is retrieved. The completion handler is executed on the main queue, and takes the following parameters :
  • modulus the modulus.
  • error nil if the modulus is retrieved successfully; otherwise an NSError encapsulates the reason of failure.

◆ getPublicExponent:()

- (void) getPublicExponent: (void(^)(NSData *publicExponent, NSError *error))  completionHandler

Gets the public exponent.

Parameters
completionHandlerthe completion handler block to be called as soon as the public exponent is retrieved. The completion handler is executed on the main queue, and takes the following parameters :
  • publicExponent the public exponent.
  • error nil if the public exponent is retrieved successfully; otherwise an NSError encapsulates the reason of failure.

The documentation for this class was generated from the following files: