class SealdSdk
@interface SealdSdk : NSObjectThis is the main class for the Seald SDK. It represents an instance of the Seald SDK.
| Members | Descriptions |
|---|---|
initWithApiUrl:appId:databasePath:databaseEncryptionKey:maxParallelRequests:instanceName:logLevel:logNoColor:encryptionSessionCacheTTL:keySize:error: | Initialize a Seald SDK Instance. |
closeWithError: | Close the current SDK instance. This frees any lock on the current database. After calling close, the instance cannot be used anymore. |
closeAsyncWithCompletionHandler: | Close the current SDK instance. This frees any lock on the current database. After calling close, the instance cannot be used anymore. |
generatePrivateKeysWithError: | Generate private keys. |
generatePrivateKeysAsyncWithCompletionHandler: | Generate private keys. |
createAccountWithSignupJwt:deviceName:displayName:privateKeys:expireAfter:error: | Create a new Seald SDK Account for this Seald SDK instance. This function can only be called if the current SDK instance does not have an account yet. |
createAccountAsyncWithSignupJwt:deviceName:displayName:privateKeys:expireAfter:completionHandler: | Create a new Seald SDK Account for this Seald SDK instance. This function can only be called if the current SDK instance does not have an account yet. |
getCurrentAccountInfo | Return information about the current account, or nil if there is none. |
getCurrentAccountInfoAsyncWithCompletionHandler: | Return information about the current account, or nil if there is none. |
updateCurrentDeviceWithError: | Updates the locally known information about the current device. |
updateCurrentDeviceAsyncWithCompletionHandler: | Updates the locally known information about the current device. |
prepareRenewWithPrivateKeys:error: | Prepare a private key renewal, so it can be stored on SSKS without risk of loss during the actual renew. |
prepareRenewAsyncWithPrivateKeys:completionHandler: | Prepare a private key renewal, so it can be stored on SSKS without risk of loss during the actual renew. |
renewKeysWithPreparedRenewal:privateKeys:expireAfter:error: | Renew the keys of the current device, extending their validity. If the current device has expired, you will need to call SealdSdk.renewKeysWithExpireAfter:error: before you are able to do anything else. Warning: if the identity of the current device is stored externally, for example on SSKS, you will want to re-export it and store it again, otherwise the previously stored identity will not be recognized anymore. |
renewKeysAsyncWithPreparedRenewal:privateKeys:expireAfter:completionHandler: | Renew the keys of the current device, extending their validity. If the current device has expired, you will need to call SealdSdk.renewKeysWithExpireAfter:error: before you are able to do anything else. Warning: if the identity of the current device is stored externally, for example on SSKS, you will want to re-export it and store it again, otherwise the previously stored identity will not be recognized anymore. |
createSubIdentityWithDeviceName:privateKeys:expireAfter:error: | Create a new sub-identity, or new device, for the current user account. After creating this new device, you will probably want to call massReencryptWithDeviceId:options:error:, so that the newly created device will be able to decrypt EncryptionSessions previously created for this account. |
createSubIdentityAsyncWithDeviceName:privateKeys:expireAfter:completionHandler: | Create a new sub-identity, or new device, for the current user account. After creating this new device, you will probably want to call massReencryptWithDeviceId:options:error:, so that the newly created device will be able to decrypt EncryptionSessions previously created for this account. |
importIdentity:error: | Load an identity export into the current SDK instance. This function can only be called if the current SDK instance does not have an account yet. |
importIdentityAsyncWithIdentity:completionHandler: | Load an identity export into the current SDK instance. This function can only be called if the current SDK instance does not have an account yet. |
exportIdentityWithError: | Export the current device as an identity export. |
exportIdentityAsyncWithCompletionHandler: | Export the current device as an identity export. |
pushJWT:error: | Push a given JWT to the Seald server, for example to add a connector to the current account. |
pushJWTAsyncWithJWT:completionHandler: | Push a given JWT to the Seald server, for example to add a connector to the current account. |
heartbeatWithError: | Just call the Seald server, without doing anything. This may be used for example to verify that the current instance has a valid identity. |
heartbeatAsyncWithCompletionHandler: | Just call the Seald server, without doing anything. This may be used for example to verify that the current instance has a valid identity. |
createGroupWithGroupName:members:admins:privateKeys:error: | Create a group, and returns the created group's ID. admins must also be members. admins must include yourself. |
createGroupAsyncWithGroupName:members:admins:privateKeys:completionHandler: | Create a group, and returns the created group's ID. admins must also be members. admins must include yourself. |
addGroupMembersWithGroupId:membersToAdd:adminsToSet:privateKeys:error: | Add members to a group. Can only be done by a group administrator. Can also specify which of these newly added group members should also be admins. |
addGroupMembersAsyncWithGroupId:membersToAdd:adminsToSet:privateKeys:completionHandler: | Add members to a group. Can only be done by a group administrator. Can also specify which of these newly added group members should also be admins. |
removeGroupMembersWithGroupId:membersToRemove:privateKeys:error: | Remove members from the group. Can only be done by a group administrator. You should call SealdSdk.renewGroupKeyWithGroupId:error: after this. |
removeGroupMembersAsyncWithGroupId:membersToRemove:privateKeys:completionHandler: | Remove members from the group. Can only be done by a group administrator. You should call SealdSdk.renewGroupKeyWithGroupId:error: after this. |
renewGroupKeyWithGroupId:privateKeys:error: | Renew the group's private key. Can only be done by a group administrator. Should be called after removing members from the group. |
renewGroupKeyAsyncWithGroupId:privateKeys:completionHandler: | Renew the group's private key. Can only be done by a group administrator. Should be called after removing members from the group. |
setGroupAdminsWithGroupId:addToAdmins:removeFromAdmins:error: | Add some existing group members to the group admins, and/or removes admin status from some existing group admins. Can only be done by a group administrator. |
setGroupAdminsAsyncWithGroupId:addToAdmins:removeFromAdmins:completionHandler: | Add some existing group members to the group admins, and/or removes admin status from some existing group admins. Can only be done by a group administrator. |
createEncryptionSessionWithRecipients:metadata:useCache:error: | Create an encryption session, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages. Warning : if you want to be able to retrieve the session later, you must put your own UserId in the recipients argument. |
createEncryptionSessionAsyncWithRecipients:metadata:useCache:completionHandler: | Create an encryption session, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages. Warning : if you want to be able to retrieve the session later, you must put your own UserId in the recipients argument. |
retrieveEncryptionSessionWithSessionId:useCache:lookupProxyKey:lookupGroupKey:error: | Retrieve an encryption session with the sessionId, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages. |
retrieveEncryptionSessionAsyncWithSessionId:useCache:lookupProxyKey:lookupGroupKey:completionHandler: | Retrieve an encryption session with the sessionId, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages. |
retrieveEncryptionSessionFromMessage:useCache:lookupProxyKey:lookupGroupKey:error: | Retrieve an encryption session from a seald message, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages. |
retrieveEncryptionSessionAsyncFromMessage:useCache:lookupProxyKey:lookupGroupKey:completionHandler: | Retrieve an encryption session from a seald message, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages. |
retrieveEncryptionSessionFromFile:useCache:lookupProxyKey:lookupGroupKey:error: | Retrieve an encryption session from a file URI, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages. |
retrieveEncryptionSessionAsyncFromFile:useCache:lookupProxyKey:lookupGroupKey:completionHandler: | Retrieve an encryption session from a file URI, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages. |
retrieveEncryptionSessionFromBytes:useCache:lookupProxyKey:lookupGroupKey:error: | Retrieve an encryption session from an NSData*, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages. |
retrieveEncryptionSessionAsyncFromBytes:useCache:lookupProxyKey:lookupGroupKey:completionHandler: | Retrieve an encryption session from an NSData*, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages. |
retrieveEncryptionSessionByTmr:sessionId:overEncryptionKey:tmrAccessesFilters:tryIfMultiple:useCache:error: | Retrieve an encryption session with a TMR access JWT. |
retrieveEncryptionSessionAsyncByTmr:sessionId:overEncryptionKey:tmrAccessesFilters:tryIfMultiple:useCache:completionHandler: | Retrieve an encryption session with a TMR access JWT. |
retrieveMultipleEncryptionSessions:useCache:lookupProxyKey:lookupGroupKey:error: | Retrieve multiple encryption sessions with an NSArray of sessionIds, and return an NSArray of the associated EncryptionSession instances, with which you can then encrypt / decrypt multiple messages. The returned array of EncryptionSession instances is in the same order as the input array. |
retrieveMultipleEncryptionSessionsAsync:useCache:lookupProxyKey:lookupGroupKey:completionHandler: | Retrieve multiple encryption sessions with an NSArray of sessionIds, and return an NSArray of the associated EncryptionSession instances, with which you can then encrypt / decrypt multiple messages. The returned array of EncryptionSession instances is in the same order as the input array. |
deserializeEncryptionSession:error: | Deserialize a serialized session. For advanced use. |
getSealdIdsFromConnectors:error: | Get all the info for the given connectors to look for, updates the local cache of connectors, and returns a slice with the corresponding SealdIds. SealdIds are not de-duped and can appear for multiple connector values. If one of the connectors is not assigned to a Seald user, this will return a ErrorGetSealdIdsUnknownConnector error, with the details of the missing connector. |
getSealdIdsAsyncFromConnectors:completionHandler: | Get all the info for the given connectors to look for, updates the local cache of connectors, and returns a slice with the corresponding SealdIds. SealdIds are not de-duped and can appear for multiple connector values. If one of the connectors is not assigned to a Seald user, this will return a ErrorGetSealdIdsUnknownConnector error, with the details of the missing connector. |
getConnectorsFromSealdId:error: | List all connectors know locally for a given sealdId. |
getConnectorsAsyncFromSealdId:completionHandler: | List all connectors know locally for a given sealdId. |
addConnectorWithValue:connectorType:preValidationToken:error: | Add a connector to the current identity. If no preValidationToken is given, the connector will need to be validated before use. |
addConnectorAsyncWithValue:connectorType:preValidationToken:completionHandler: | Add a connector to the current identity. If no preValidationToken is given, the connector will need to be validated before use. |
validateConnector:challenge:error: | Validate an added connector that was added without a preValidationToken. |
validateConnectorAsyncWithConnectorId:challenge:completionHandler: | Validate an added connector that was added without a preValidationToken. |
removeConnector:error: | Remove a connector belonging to the current account. |
removeConnectorAsyncWithConnectorId:completionHandler: | Remove a connector belonging to the current account. |
listConnectorsWithError: | List connectors associated to the current account. |
listConnectorsAsyncWithCompletionHandler: | List connectors associated to the current account. |
retrieveConnector:error: | Retrieve a connector by its connectorId, then updates the local cache of connectors. |
retrieveConnectorAsyncWithConnectorId:completionHandler: | Retrieve a connector by its connectorId, then updates the local cache of connectors. |
massReencryptWithDeviceId:options:error: | Retrieve, re-encrypt, and add missing keys for a certain device. |
massReencryptAsyncWithDeviceId:options:completionHandler: | Retrieve, re-encrypt, and add missing keys for a certain device. |
devicesMissingKeysWithForceLocalAccountUpdate:error: | List which of the devices of the current account are missing keys, so you can call massReencryptWithDeviceId:options:error: for them. |
devicesMissingKeysAsyncWithForceLocalAccountUpdate:completionHandler: | List which of the devices of the current account are missing keys, so you can call massReencryptWithDeviceId:options:error: for them. |
getSigchainHashWithUserId:position:error: | Get a user's sigchain transaction hash at index position. |
getSigchainHashAsyncWithUserId:position:completionHandler: | Get a user's sigchain transaction hash at index position. |
checkSigchainHashWithUserId:expectedHash:position:error: | Verify if a given hash is included in the recipient's sigchain. Use the position option to check the hash of a specific sigchain transaction. |
checkSigchainHashAsyncWithUserId:expectedHash:position:completionHandler: | Verify if a given hash is included in the recipient's sigchain. Use the position option to check the hash of a specific sigchain transaction. |
convertTmrAccesses:overEncryptionKey:conversionFilters:deleteOnConvert:error: | Convert all TMR Accesses addressed to a given auth factor and matching specified filters to classic message keys. All TMR accesses matching the specified filters must have been encrypted with the same overEncryptionKey. |
convertTmrAccessesAsync:overEncryptionKey:conversionFilters:deleteOnConvert:completionHandler: | Convert all TMR Accesses addressed to a given auth factor and matching specified filters to classic message keys. All TMR accesses matching the specified filters must have been encrypted with the same overEncryptionKey. |
createGroupTMRTemporaryKeyWithGroupId:authFactor:isAdmin:rawOverEncryptionKey:error: | Create a group TMR temporary key, and returns the created GroupTmrTemporaryKey instance. |
createGroupTMRTemporaryKeyAsyncWithGroupId:authFactor:isAdmin:rawOverEncryptionKey:completionHandler: | Create a group TMR temporary key, and returns the created GroupTmrTemporaryKey instance. |
listGroupTMRTemporaryKeysWithGroupId:page:all:error: | List group TMR temporary keys. |
listGroupTMRTemporaryKeysAsyncWithGroupId:page:all:completionHandler: | List group TMR temporary keys. |
searchGroupTMRTemporaryKeysWithTmrJWT:options:error: | Search group TMR temporary keys that can be used with the TMR JWT. |
searchGroupTMRTemporaryKeysAsyncWithTmrJWT:options:completionHandler: | Search group TMR temporary keys that can be used with the TMR JWT. |
convertGroupTMRTemporaryKeyWithGroupId:temporaryKeyId:tmrJWT:rawOverEncryptionKey:deleteOnConvert:error: | Convert a group TMR temporary key to become a group member. |
convertGroupTMRTemporaryKeyAsyncWithGroupId:temporaryKeyId:tmrJWT:rawOverEncryptionKey:deleteOnConvert:completionHandler: | Convert a group TMR temporary key to become a group member. |
deleteGroupTMRTemporaryKeyWithGroupId:temporaryKeyId:error: | Delete a group TMR temporary key. |
deleteGroupTMRTemporaryKeyAsyncWithGroupId:temporaryKeyId:completionHandler: | Delete a group TMR temporary key. |
initWithApiUrl:appId:databasePath:databaseEncryptionKey:maxParallelRequests:instanceName:logLevel:logNoColor:encryptionSessionCacheTTL:keySize:error:
- (instancetype) initWithApiUrl:(const NSString *)apiUrl
appId:(const NSString *)appId
databasePath:(const NSString *_Nullable)databasePath
databaseEncryptionKey:(const NSData *_Nullable)databaseEncryptionKey
maxParallelRequests:(const NSInteger)maxParallelRequests
instanceName:(const NSString *)instanceName
logLevel:(const NSInteger)logLevel
logNoColor:(const BOOL)logNoColor
encryptionSessionCacheTTL:(const NSTimeInterval)encryptionSessionCacheTTL
keySize:(const NSInteger)keySize
error:(NSError *_Nullable *)error;Initialize a Seald SDK Instance.
Parameters
apiUrlThe Seald server for this instance to use. This value is given on your Seald dashboard.appIdThe ID given by the Seald server to your app. This value is given on your Seald dashboard.databasePathThe path where to store the local Seald database. If no path is passed, uses an in-memory only database.databaseEncryptionKeyThe encryption key with which to encrypt the local Seald database. Required when passingdatabasePath. This must be a cryptographically random NSData of 64 bytes.maxParallelRequestsThe maximum number of concurrent network requests allowed for this instance. Set to 0 to use the default (10). Set to a negative value to disable the limit entirely.instanceNameAn arbitrary name to give to this Seald instance. Can be useful for debugging when multiple instances are running in parallel, as it is added to logs.logLevelThe minimum level of logs you want. All logs of this level or above will be displayed.-1: Trace;0: Debug;1: Info;2: Warn;3: Error;4: Fatal;5: Panic;6: NoLevel;7: Disabled.logNoColorShould be set toNOif you want to enable colors in the log output,YESif you don't.encryptionSessionCacheTTLThe duration of cache lifetime.-1to cache forever. Default to0(no cache).keySizeThe Asymmetric key size for newly generated keys. Defaults to 4096. Warning: for security, it is extremely not recommended to lower this value.errorError pointer.
closeWithError:
- (void) closeWithError:(NSError *_Nullable *)error;Close the current SDK instance. This frees any lock on the current database. After calling close, the instance cannot be used anymore.
Parameters
errorError pointer.
closeAsyncWithCompletionHandler:
- (void) closeAsyncWithCompletionHandler:(void(^)(NSError *_Nullable error))completionHandler;Close the current SDK instance. This frees any lock on the current database. After calling close, the instance cannot be used anymore.
Parameters
completionHandlerA callback called after function execution. This callback takes a pointer to aNSErrorthat indicates if any error occurred.
generatePrivateKeysWithError:
- (SealdGeneratedPrivateKeys *) generatePrivateKeysWithError:(NSError *_Nullable *)error;Generate private keys.
Parameters
errorError pointer.
Returns
A SealdGeneratedPrivateKeys* instance that can be used with methods that need private keys.
generatePrivateKeysAsyncWithCompletionHandler:
- (void) generatePrivateKeysAsyncWithCompletionHandler:(void(^)(SealdGeneratedPrivateKeys *privateKeys, NSError *_Nullable error))completionHandler;Generate private keys.
Parameters
completionHandlerA callback called after function execution. This callback takes two arguments, aSealdGeneratedPrivateKeys*representing the generated private keys and aNSErrorthat indicates if any error occurred.
createAccountWithSignupJwt:deviceName:displayName:privateKeys:expireAfter:error:
- (SealdAccountInfo *) createAccountWithSignupJwt:(const NSString *)signupJwt
deviceName:(const NSString *)deviceName
displayName:(const NSString *)displayName
privateKeys:(nullable SealdGeneratedPrivateKeys *)privateKeys
expireAfter:(const NSTimeInterval)expireAfter
error:(NSError *_Nullable *)error;Create a new Seald SDK Account for this Seald SDK instance. This function can only be called if the current SDK instance does not have an account yet.
Parameters
signupJwtThe JWT to allow this SDK instance to create an account.deviceNameA name for the device to create. This is metadata, useful on the Seald Dashboard for recognizing this device.displayNameA name for the user to create. This is metadata, useful on the Seald Dashboard for recognizing this user.privateKeysOptional. Pre-generated private keys, returned by a call to generatePrivateKeysWithError:.expireAfterThe duration during which the created device key will be valid without renewal. Optional, defaults to 5 years.errorError pointer.
Returns
A SealdAccountInfo instance, containing the Seald ID of the newly created Seald user, the device ID, and the date at which the current device keys will expire.
createAccountAsyncWithSignupJwt:deviceName:displayName:privateKeys:expireAfter:completionHandler:
- (void) createAccountAsyncWithSignupJwt:(const NSString *)signupJwt
deviceName:(const NSString *)deviceName
displayName:(const NSString *)displayName
privateKeys:(nullable SealdGeneratedPrivateKeys *)privateKeys
expireAfter:(const NSTimeInterval)expireAfter
completionHandler:(void(^)(SealdAccountInfo *accountInfo, NSError *_Nullable error))completionHandler;Create a new Seald SDK Account for this Seald SDK instance. This function can only be called if the current SDK instance does not have an account yet.
Parameters
signupJwtThe JWT to allow this SDK instance to create an account.deviceNameA name for the device to create. This is metadata, useful on the Seald Dashboard for recognizing this device.displayNameA name for the user to create. This is metadata, useful on the Seald Dashboard for recognizing this user.privateKeysOptional. Pre-generated private keys, returned by a call to generatePrivateKeysWithError:.expireAfterThe duration during which the created device key will be valid without renewal. Optional, defaults to 5 years.completionHandlerA callback called after function execution. This callback takes two arguments, a SealdAccountInfo representing the created user and aNSErrorthat indicates if any error occurred.
getCurrentAccountInfo
- (nullable SealdAccountInfo *) getCurrentAccountInfo;Return information about the current account, or nil if there is none.
Returns
A SealdAccountInfo instance, containing the Seald ID of the local Seald user, the device ID, and the date at which the current device keys will expire. nil if there is no local user.
getCurrentAccountInfoAsyncWithCompletionHandler:
- (void) getCurrentAccountInfoAsyncWithCompletionHandler:(void(^)(SealdAccountInfo *_Nullable))completionHandler;Return information about the current account, or nil if there is none.
Parameters
completionHandlerA callback called after function execution. This callback takes two arguments, a SealdAccountInfo* containing the current user infos and aNSError*that indicates if any error occurred.
updateCurrentDeviceWithError:
- (void) updateCurrentDeviceWithError:(NSError *_Nullable *)error;Updates the locally known information about the current device.
You should never have to call this manually, except if you getting nil in sealdAccountInfo.deviceExpires, which can happen if migrating from an older version of the SDK, or if the internal call to updateCurrentDevice failed when calling importIdentity:error:.
Parameters
errorError pointer.
updateCurrentDeviceAsyncWithCompletionHandler:
- (void) updateCurrentDeviceAsyncWithCompletionHandler:(void(^)(NSError *_Nullable error))completionHandler;Updates the locally known information about the current device.
You should never have to call this manually, except if you getting nil in sealdAccountInfo.deviceExpires, which can happen if migrating from an older version of the SDK, or if the internal call to updateCurrentDevice failed when calling importIdentity:error:.
Parameters
completionHandlerA callback called after function execution. This callback takes a pointer to aNSErrorthat indicates if any error occurred.
prepareRenewWithPrivateKeys:error:
- (NSData *) prepareRenewWithPrivateKeys:(nullable SealdGeneratedPrivateKeys *)privateKeys
error:(NSError *_Nullable *)error;Prepare a private key renewal, so it can be stored on SSKS without risk of loss during the actual renew.
Parameters
privateKeysOptional. Pre-generated private keys, returned by a call to generatePrivateKeysWithError:.errorError pointer.
Returns
The prepared renewal.
prepareRenewAsyncWithPrivateKeys:completionHandler:
- (void) prepareRenewAsyncWithPrivateKeys:(nullable SealdGeneratedPrivateKeys *)privateKeys
completionHandler:(void(^)(NSData *preparedRenewal, NSError *_Nullable error))completionHandler;Prepare a private key renewal, so it can be stored on SSKS without risk of loss during the actual renew.
Parameters
privateKeysOptional. Pre-generated private keys, returned by a call to generatePrivateKeysWithError:.completionHandlerA callback called after function execution. This callback takes two arguments, aNSData*representing the prepared renewal and aNSErrorthat indicates if any error occurred.
renewKeysWithPreparedRenewal:privateKeys:expireAfter:error:
- (void) renewKeysWithPreparedRenewal:(nullable const NSData *)preparedRenewal
privateKeys:(nullable SealdGeneratedPrivateKeys *)privateKeys
expireAfter:(const NSTimeInterval)expireAfter
error:(NSError *_Nullable *)error;Renew the keys of the current device, extending their validity. If the current device has expired, you will need to call SealdSdk.renewKeysWithExpireAfter:error: before you are able to do anything else. Warning: if the identity of the current device is stored externally, for example on SSKS, you will want to re-export it and store it again, otherwise the previously stored identity will not be recognized anymore.
Parameters
preparedRenewalOptional. The preparedRenewal generated by calling SealdSdk.prepareRenew:error:.privateKeysOptional. Pre-generated private keys, returned by a call to generatePrivateKeysWithError:.expireAfterThe duration during which the renewed device key will be valid without further renewal. Optional, defaults to 5 years.errorError pointer.
renewKeysAsyncWithPreparedRenewal:privateKeys:expireAfter:completionHandler:
- (void) renewKeysAsyncWithPreparedRenewal:(nullable const NSData *)preparedRenewal
privateKeys:(nullable SealdGeneratedPrivateKeys *)privateKeys
expireAfter:(const NSTimeInterval)expireAfter
completionHandler:(void(^)(NSError *_Nullable error))completionHandler;Renew the keys of the current device, extending their validity. If the current device has expired, you will need to call SealdSdk.renewKeysWithExpireAfter:error: before you are able to do anything else. Warning: if the identity of the current device is stored externally, for example on SSKS, you will want to re-export it and store it again, otherwise the previously stored identity will not be recognized anymore.
Parameters
preparedRenewalOptional. The preparedRenewal generated by calling SealdSdk.prepareRenew:error:.privateKeysOptional. Pre-generated private keys, returned by a call to generatePrivateKeysWithError:.expireAfterThe duration during which the renewed device key will be valid without further renewal. Optional, defaults to 5 years.completionHandlerA callback called after function execution. This callback takes a pointer to aNSErrorthat indicates if any error occurred.
createSubIdentityWithDeviceName:privateKeys:expireAfter:error:
- (SealdCreateSubIdentityResponse *) createSubIdentityWithDeviceName:(const NSString *)deviceName
privateKeys:(nullable SealdGeneratedPrivateKeys *)privateKeys
expireAfter:(const NSTimeInterval)expireAfter
error:(NSError *_Nullable *)error;Create a new sub-identity, or new device, for the current user account. After creating this new device, you will probably want to call massReencryptWithDeviceId:options:error:, so that the newly created device will be able to decrypt EncryptionSessions previously created for this account.
Parameters
deviceNameAn optional name for the device to create. This is metadata, useful on the Seald Dashboard for recognizing this device. Optional.privateKeysOptional. Pre-generated private keys, returned by a call to generatePrivateKeysWithError:.expireAfterThe duration during which the device key for the device to create will be valid without renewal. Optional, defaults to 5 years.errorIf an error occurs, upon return contains anNSErrorobject that describes the problem.
Returns
A CreateSubIdentityResponse instance, containing deviceId (the ID of the newly created device) and backupKey (the identity export of the newly created sub-identity).
createSubIdentityAsyncWithDeviceName:privateKeys:expireAfter:completionHandler:
- (void) createSubIdentityAsyncWithDeviceName:(const NSString *)deviceName
privateKeys:(nullable SealdGeneratedPrivateKeys *)privateKeys
expireAfter:(const NSTimeInterval)expireAfter
completionHandler:(void(^)(SealdCreateSubIdentityResponse *response, NSError *_Nullable error))completionHandler;Create a new sub-identity, or new device, for the current user account. After creating this new device, you will probably want to call massReencryptWithDeviceId:options:error:, so that the newly created device will be able to decrypt EncryptionSessions previously created for this account.
Parameters
deviceNameAn optional name for the device to create. This is metadata, useful on the Seald Dashboard for recognizing this device. Optional.privateKeysOptional. Pre-generated private keys, returned by a call to generatePrivateKeysWithError:.expireAfterThe duration during which the device key for the device to create will be valid without renewal. Optional, defaults to 5 years.completionHandlerA callback called after function execution. This callback takes two arguments, a SealdCreateSubIdentityResponse* representing the created sub-identity and aNSErrorthat indicates if any error occurred.
importIdentity:error:
- (void) importIdentity:(const NSData *)identity
error:(NSError *_Nullable *)error;Load an identity export into the current SDK instance. This function can only be called if the current SDK instance does not have an account yet.
Parameters
identityThe identity export that this SDK instance should import.errorIf an error occurs, upon return contains anNSErrorobject that describes the problem.
importIdentityAsyncWithIdentity:completionHandler:
- (void) importIdentityAsyncWithIdentity:(const NSData *)identity
completionHandler:(void(^)(NSError *_Nullable error))completionHandler;Load an identity export into the current SDK instance. This function can only be called if the current SDK instance does not have an account yet.
Parameters
identityThe identity export that this SDK instance should import.completionHandlerA callback called after function execution. This callback takes a pointer to aNSErrorthat indicates if any error occurred.
exportIdentityWithError:
- (NSData *) exportIdentityWithError:(NSError *_Nullable *)error;Export the current device as an identity export.
Parameters
errorIf an error occurs, upon return contains anNSErrorobject that describes the problem.
Returns
The identity export of the current identity of this SDK instance.
exportIdentityAsyncWithCompletionHandler:
- (void) exportIdentityAsyncWithCompletionHandler:(void(^)(NSData *identity, NSError *_Nullable error))completionHandler;Export the current device as an identity export.
Parameters
completionHandlerA callback called after function execution. This callback takes two arguments, aNSData*containing the exported identity, and aNSErrorthat indicates if any error occurred.
pushJWT:error:
- (void) pushJWT:(const NSString *)jwt
error:(NSError *_Nullable *)error;Push a given JWT to the Seald server, for example to add a connector to the current account.
Parameters
jwtThe JWT to pusherrorIf an error occurs, upon return contains anNSErrorobject that describes the problem.
pushJWTAsyncWithJWT:completionHandler:
- (void) pushJWTAsyncWithJWT:(const NSString *)jwt
completionHandler:(void(^)(NSError *_Nullable error))completionHandler;Push a given JWT to the Seald server, for example to add a connector to the current account.
Parameters
jwtThe JWT to pushcompletionHandlerA callback called after function execution. This callback takes a pointer to aNSErrorthat indicates if any error occurred.
heartbeatWithError:
- (void) heartbeatWithError:(NSError *_Nullable *)error;Just call the Seald server, without doing anything. This may be used for example to verify that the current instance has a valid identity.
Parameters
errorIf an error occurs, upon return contains anNSErrorobject that describes the problem.
heartbeatAsyncWithCompletionHandler:
- (void) heartbeatAsyncWithCompletionHandler:(void(^)(NSError *_Nullable error))completionHandler;Just call the Seald server, without doing anything. This may be used for example to verify that the current instance has a valid identity.
Parameters
completionHandlerA callback called after function execution. This callback takes a pointer to aNSErrorthat indicates if any error occurred.
createGroupWithGroupName:members:admins:privateKeys:error:
- (NSString *) createGroupWithGroupName:(const NSString *)groupName
members:(const NSArray< NSString * > *)members
admins:(const NSArray< NSString * > *)admins
privateKeys:(nullable SealdGeneratedPrivateKeys *)privateKeys
error:(NSError *_Nullable *)error;Create a group, and returns the created group's ID. admins must also be members. admins must include yourself.
Parameters
groupNameA name for the group. This is metadata, useful on the Seald Dashboard for recognizing this user.membersThe Seald IDs of the members to add to the group. Must include yourself.adminsThe Seald IDs of the members to also add as group admins. Must include yourself.privateKeysOptional. Pre-generated private keys, returned by a call to generatePrivateKeysWithError:.errorIf an error occurs, upon return contains anNSErrorobject that describes the problem.
Returns
The ID of the created group.
createGroupAsyncWithGroupName:members:admins:privateKeys:completionHandler:
- (void) createGroupAsyncWithGroupName:(const NSString *)groupName
members:(const NSArray< NSString * > *)members
admins:(const NSArray< NSString * > *)admins
privateKeys:(nullable SealdGeneratedPrivateKeys *)privateKeys
completionHandler:(void(^)(NSString *groupId, NSError *_Nullable error))completionHandler;Create a group, and returns the created group's ID. admins must also be members. admins must include yourself.
Parameters
groupNameA name for the group. This is metadata, useful on the Seald Dashboard for recognizing this user.membersThe Seald IDs of the members to add to the group. Must include yourself.adminsThe Seald IDs of the members to also add as group admins. Must include yourself.privateKeysOptional. Pre-generated private keys, returned by a call to generatePrivateKeysWithError:.completionHandlerA callback called after function execution. This callback takes two arguments, aNSString*containing the ID of the created group and aNSErrorthat indicates if any error occurred.
addGroupMembersWithGroupId:membersToAdd:adminsToSet:privateKeys:error:
- (void) addGroupMembersWithGroupId:(const NSString *)groupId
membersToAdd:(const NSArray< NSString * > *)membersToAdd
adminsToSet:(const NSArray< NSString * > *)adminsToSet
privateKeys:(nullable SealdGeneratedPrivateKeys *)privateKeys
error:(NSError *_Nullable *)error;Add members to a group. Can only be done by a group administrator. Can also specify which of these newly added group members should also be admins.
Parameters
groupIdThe group in which to add members.membersToAddThe Seald IDs of the members to add to the group.adminsToSetThe Seald IDs of the newly added members to also set as group admins.privateKeysOptional. Pre-generated private keys, returned by a call to generatePrivateKeysWithError:.errorIf an error occurs, upon return contains anNSErrorobject that describes the problem.
addGroupMembersAsyncWithGroupId:membersToAdd:adminsToSet:privateKeys:completionHandler:
- (void) addGroupMembersAsyncWithGroupId:(const NSString *)groupId
membersToAdd:(const NSArray< NSString * > *)membersToAdd
adminsToSet:(const NSArray< NSString * > *)adminsToSet
privateKeys:(nullable SealdGeneratedPrivateKeys *)privateKeys
completionHandler:(void(^)(NSError *_Nullable error))completionHandler;Add members to a group. Can only be done by a group administrator. Can also specify which of these newly added group members should also be admins.
Parameters
groupIdThe group in which to add members.membersToAddThe Seald IDs of the members to add to the group.adminsToSetThe Seald IDs of the newly added members to also set as group admins.privateKeysOptional. Pre-generated private keys, returned by a call to generatePrivateKeysWithError:.completionHandlerA callback called after function execution. This callback takes a pointer to aNSErrorthat indicates if any error occurred.
removeGroupMembersWithGroupId:membersToRemove:privateKeys:error:
- (void) removeGroupMembersWithGroupId:(const NSString *)groupId
membersToRemove:(const NSArray< NSString * > *)membersToRemove
privateKeys:(nullable SealdGeneratedPrivateKeys *)privateKeys
error:(NSError *_Nullable *)error;Remove members from the group. Can only be done by a group administrator. You should call SealdSdk.renewGroupKeyWithGroupId:error: after this.
Parameters
groupIdThe group from which to remove members.membersToRemoveThe Seald IDs of the members to remove from the group.privateKeysOptional. Pre-generated private keys, returned by a call to generatePrivateKeysWithError:.errorIf an error occurs, upon return contains anNSErrorobject that describes the problem.
removeGroupMembersAsyncWithGroupId:membersToRemove:privateKeys:completionHandler:
- (void) removeGroupMembersAsyncWithGroupId:(const NSString *)groupId
membersToRemove:(const NSArray< NSString * > *)membersToRemove
privateKeys:(nullable SealdGeneratedPrivateKeys *)privateKeys
completionHandler:(void(^)(NSError *_Nullable error))completionHandler;Remove members from the group. Can only be done by a group administrator. You should call SealdSdk.renewGroupKeyWithGroupId:error: after this.
Parameters
groupIdThe group from which to remove members.membersToRemoveThe Seald IDs of the members to remove from the group.privateKeysOptional. Pre-generated private keys, returned by a call to generatePrivateKeysWithError:.completionHandlerA callback called after function execution. This callback takes a pointer to aNSErrorthat indicates if any error occurred.
renewGroupKeyWithGroupId:privateKeys:error:
- (void) renewGroupKeyWithGroupId:(const NSString *)groupId
privateKeys:(nullable SealdGeneratedPrivateKeys *)privateKeys
error:(NSError *_Nullable *)error;Renew the group's private key. Can only be done by a group administrator. Should be called after removing members from the group.
Parameters
groupIdThe group for which to renew the private key.privateKeysOptional. Pre-generated private keys, returned by a call to generatePrivateKeysWithError:.errorIf an error occurs, upon return contains anNSErrorobject that describes the problem.
renewGroupKeyAsyncWithGroupId:privateKeys:completionHandler:
- (void) renewGroupKeyAsyncWithGroupId:(const NSString *)groupId
privateKeys:(nullable SealdGeneratedPrivateKeys *)privateKeys
completionHandler:(void(^)(NSError *_Nullable error))completionHandler;Renew the group's private key. Can only be done by a group administrator. Should be called after removing members from the group.
Parameters
groupIdThe group for which to renew the private key.privateKeysOptional. Pre-generated private keys, returned by a call to generatePrivateKeysWithError:.completionHandlerA callback called after function execution. This callback takes a pointer to aNSErrorthat indicates if any error occurred.
setGroupAdminsWithGroupId:addToAdmins:removeFromAdmins:error:
- (void) setGroupAdminsWithGroupId:(const NSString *)groupId
addToAdmins:(const NSArray< NSString * > *)addToAdmins
removeFromAdmins:(const NSArray< NSString * > *)removeFromAdmins
error:(NSError *_Nullable *)error;Add some existing group members to the group admins, and/or removes admin status from some existing group admins. Can only be done by a group administrator.
Parameters
groupIdThe group for which to set admins.addToAdminsThe Seald IDs of existing group members to add as group admins.removeFromAdminsThe Seald IDs of existing group members to remove from group admins.errorIf an error occurs, upon return contains anNSErrorobject that describes the problem.
setGroupAdminsAsyncWithGroupId:addToAdmins:removeFromAdmins:completionHandler:
- (void) setGroupAdminsAsyncWithGroupId:(const NSString *)groupId
addToAdmins:(const NSArray< NSString * > *)addToAdmins
removeFromAdmins:(const NSArray< NSString * > *)removeFromAdmins
completionHandler:(void(^)(NSError *_Nullable error))completionHandler;Add some existing group members to the group admins, and/or removes admin status from some existing group admins. Can only be done by a group administrator.
Parameters
groupIdThe group for which to set admins.addToAdminsThe Seald IDs of existing group members to add as group admins.removeFromAdminsThe Seald IDs of existing group members to remove from group admins.completionHandlerA callback called after function execution. This callback takes a pointer to aNSErrorthat indicates if any error occurred.
createEncryptionSessionWithRecipients:metadata:useCache:error:
- (SealdEncryptionSession *) createEncryptionSessionWithRecipients:(const NSArray< SealdRecipientWithRights * > *)recipients
metadata:(const NSString *_Nullable)metadata
useCache:(const BOOL)useCache
error:(NSError *_Nullable *)error;Create an encryption session, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages. Warning : if you want to be able to retrieve the session later, you must put your own UserId in the recipients argument.
Parameters
recipientsThe Seald IDs with the associated rights of users who should be able to retrieve this session.metadataArbitrary metadata string, not encrypted, for later reference. Max 1024 characters long.useCacheWhether or not to use the cache (if enabled globally).errorThe error that occurred while creating the session, if any.
Returns
The created SealdEncryptionSession, or null if an error occurred.
createEncryptionSessionAsyncWithRecipients:metadata:useCache:completionHandler:
- (void) createEncryptionSessionAsyncWithRecipients:(const NSArray< SealdRecipientWithRights * > *)recipients
metadata:(const NSString *_Nullable)metadata
useCache:(const BOOL)useCache
completionHandler:(void(^)(SealdEncryptionSession *encryptionSession, NSError *_Nullable error))completionHandler;Create an encryption session, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages. Warning : if you want to be able to retrieve the session later, you must put your own UserId in the recipients argument.
Parameters
recipientsThe Seald IDs with the associated rights of users who should be able to retrieve this session.metadataArbitrary metadata string, not encrypted, for later reference. Max 1024 characters long.useCacheWhether or not to use the cache (if enabled globally).completionHandlerA callback called after function execution. This callback takes two arguments, a SealdEncryptionSession* containing the created encryption session, and aNSError*that indicates if any error occurred.
retrieveEncryptionSessionWithSessionId:useCache:lookupProxyKey:lookupGroupKey:error:
- (SealdEncryptionSession *) retrieveEncryptionSessionWithSessionId:(const NSString *)sessionId
useCache:(const BOOL)useCache
lookupProxyKey:(const BOOL)lookupProxyKey
lookupGroupKey:(const BOOL)lookupGroupKey
error:(NSError *_Nullable *)error;Retrieve an encryption session with the sessionId, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages.
Parameters
sessionIdThe ID of the session to retrieve.useCacheWhether or not to use the cache (if enabled globally).lookupProxyKeyWhether or not to try retrieving the session via a proxy.lookupGroupKeyWhether or not to try retrieving the session via a group.errorThe error that occurred while retrieving the session, if any.
Returns
The retrieved SealdEncryptionSession, or null if an error occurred.
retrieveEncryptionSessionAsyncWithSessionId:useCache:lookupProxyKey:lookupGroupKey:completionHandler:
- (void) retrieveEncryptionSessionAsyncWithSessionId:(const NSString *)sessionId
useCache:(const BOOL)useCache
lookupProxyKey:(const BOOL)lookupProxyKey
lookupGroupKey:(const BOOL)lookupGroupKey
completionHandler:(void(^)(SealdEncryptionSession *encryptionSession, NSError *_Nullable error))completionHandler;Retrieve an encryption session with the sessionId, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages.
Parameters
sessionIdThe ID of the session to retrieve.useCacheWhether or not to use the cache (if enabled globally).lookupProxyKeyWhether or not to try retrieving the session via a proxy.lookupGroupKeyWhether or not to try retrieving the session via a group.completionHandlerA callback called after function execution. This callback takes two arguments, a SealdEncryptionSession* instance of the retrieved encryption session, and aNSError*that indicates if any error occurred.
retrieveEncryptionSessionFromMessage:useCache:lookupProxyKey:lookupGroupKey:error:
- (SealdEncryptionSession *) retrieveEncryptionSessionFromMessage:(const NSString *_Nonnull)message
useCache:(const BOOL)useCache
lookupProxyKey:(const BOOL)lookupProxyKey
lookupGroupKey:(const BOOL)lookupGroupKey
error:(NSError *_Nullable *)error;Retrieve an encryption session from a seald message, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages.
Parameters
messageAny message belonging to the session to retrieve.useCacheWhether or not to use the cache (if enabled globally).lookupProxyKeyWhether or not to try retrieving the session via a proxy.lookupGroupKeyWhether or not to try retrieving the session via a group.errorThe error that occurred while retrieving the session, if any.
Returns
The retrieved SealdEncryptionSession, or null if an error occurred.
retrieveEncryptionSessionAsyncFromMessage:useCache:lookupProxyKey:lookupGroupKey:completionHandler:
- (void) retrieveEncryptionSessionAsyncFromMessage:(const NSString *_Nonnull)message
useCache:(const BOOL)useCache
lookupProxyKey:(const BOOL)lookupProxyKey
lookupGroupKey:(const BOOL)lookupGroupKey
completionHandler:(void(^)(SealdEncryptionSession *encryptionSession, NSError *_Nullable error))completionHandler;Retrieve an encryption session from a seald message, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages.
Parameters
messageAny message belonging to the session to retrieve.useCacheWhether or not to use the cache (if enabled globally).lookupProxyKeyWhether or not to try retrieving the session via a proxy.lookupGroupKeyWhether or not to try retrieving the session via a group.completionHandlerA callback called after function execution. This callback takes two arguments, a SealdEncryptionSession* instance of the retrieved encryption session, and aNSError*that indicates if any error occurred.
retrieveEncryptionSessionFromFile:useCache:lookupProxyKey:lookupGroupKey:error:
- (SealdEncryptionSession *) retrieveEncryptionSessionFromFile:(const NSString *_Nonnull)fileURI
useCache:(const BOOL)useCache
lookupProxyKey:(const BOOL)lookupProxyKey
lookupGroupKey:(const BOOL)lookupGroupKey
error:(NSError *_Nullable *)error;Retrieve an encryption session from a file URI, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages.
Parameters
fileURIAn URI to an encrypted file belonging to the session to retrieve.useCacheWhether or not to use the cache (if enabled globally).lookupProxyKeyWhether or not to try retrieving the session via a proxy.lookupGroupKeyWhether or not to try retrieving the session via a group.errorThe error that occurred while retrieving the session, if any.
Returns
The retrieved SealdEncryptionSession, or null if an error occurred.
retrieveEncryptionSessionAsyncFromFile:useCache:lookupProxyKey:lookupGroupKey:completionHandler:
- (void) retrieveEncryptionSessionAsyncFromFile:(const NSString *_Nonnull)fileURI
useCache:(const BOOL)useCache
lookupProxyKey:(const BOOL)lookupProxyKey
lookupGroupKey:(const BOOL)lookupGroupKey
completionHandler:(void(^)(SealdEncryptionSession *encryptionSession, NSError *_Nullable error))completionHandler;Retrieve an encryption session from a file URI, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages.
Parameters
fileURIAn URI to an encrypted file belonging to the session to retrieve.useCacheWhether or not to use the cache (if enabled globally).lookupProxyKeyWhether or not to try retrieving the session via a proxy.lookupGroupKeyWhether or not to try retrieving the session via a group.completionHandlerA callback called after function execution. This callback takes two arguments, a SealdEncryptionSession* instance of the retrieved encryption session, and aNSError*that indicates if any error occurred.
retrieveEncryptionSessionFromBytes:useCache:lookupProxyKey:lookupGroupKey:error:
- (SealdEncryptionSession *) retrieveEncryptionSessionFromBytes:(const NSData *_Nonnull)fileBytes
useCache:(const BOOL)useCache
lookupProxyKey:(const BOOL)lookupProxyKey
lookupGroupKey:(const BOOL)lookupGroupKey
error:(NSError *_Nullable *)error;Retrieve an encryption session from an NSData*, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages.
Parameters
fileBytesNSData*of an encrypted file belonging to the session to retrieve.useCacheWhether or not to use the cache (if enabled globally).lookupProxyKeyWhether or not to try retrieving the session via a proxy.lookupGroupKeyWhether or not to try retrieving the session via a group.errorThe error that occurred while retrieving the session, if any.
Returns
The retrieved SealdEncryptionSession, or null if an error occurred.
retrieveEncryptionSessionAsyncFromBytes:useCache:lookupProxyKey:lookupGroupKey:completionHandler:
- (void) retrieveEncryptionSessionAsyncFromBytes:(const NSData *_Nonnull)fileBytes
useCache:(const BOOL)useCache
lookupProxyKey:(const BOOL)lookupProxyKey
lookupGroupKey:(const BOOL)lookupGroupKey
completionHandler:(void(^)(SealdEncryptionSession *encryptionSession, NSError *_Nullable error))completionHandler;Retrieve an encryption session from an NSData*, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages.
Parameters
fileBytesNSData*of an encrypted file belonging to the session to retrieve.useCacheWhether or not to use the cache (if enabled globally).lookupProxyKeyWhether or not to try retrieving the session via a proxy.lookupGroupKeyWhether or not to try retrieving the session via a group.completionHandlerA callback called after function execution. This callback takes two arguments, a SealdEncryptionSession* instance of the retrieved encryption session, and aNSError*that indicates if any error occurred.
retrieveEncryptionSessionByTmr:sessionId:overEncryptionKey:tmrAccessesFilters:tryIfMultiple:useCache:error:
- (SealdEncryptionSession *) retrieveEncryptionSessionByTmr:(const NSString *)tmrJWT
sessionId:(const NSString *)sessionId
overEncryptionKey:(const NSData *)overEncryptionKey
tmrAccessesFilters:(const SealdTmrAccessesRetrievalFilters *_Nullable)tmrAccessesFilters
tryIfMultiple:(const BOOL)tryIfMultiple
useCache:(const BOOL)useCache
error:(NSError *_Nullable *)error;Retrieve an encryption session with a TMR access JWT.
Parameters
tmrJWTThe TMR JWT.sessionIdThe id of the session to retrieve.overEncryptionKeyTMR over-encryption key. This MUST be a cryptographically random NSData of 64 bytes.tmrAccessesFiltersRetrieval tmr accesses filters. If multiple TMR Accesses for this session are associated with the auth factor, filter out the unwanted ones.tryIfMultipleIf multiple accesses are found for this session associated with the auth factor, whether or not to loop over all of them to find the wanted one.useCacheWhether or not to use the cache (if enabled globally).errorThe error that occurred while retrieving the session, if any.
Returns
The retrieved SealdEncryptionSession, or null if an error occurred.
retrieveEncryptionSessionAsyncByTmr:sessionId:overEncryptionKey:tmrAccessesFilters:tryIfMultiple:useCache:completionHandler:
- (void) retrieveEncryptionSessionAsyncByTmr:(const NSString *)tmrJWT
sessionId:(const NSString *)sessionId
overEncryptionKey:(const NSData *)overEncryptionKey
tmrAccessesFilters:(const SealdTmrAccessesRetrievalFilters *_Nullable)tmrAccessesFilters
tryIfMultiple:(const BOOL)tryIfMultiple
useCache:(const BOOL)useCache
completionHandler:(void(^)(SealdEncryptionSession *encryptionSession, NSError *_Nullable error))completionHandler;Retrieve an encryption session with a TMR access JWT.
Parameters
tmrJWTThe TMR JWT.sessionIdThe id of the session to retrieve.overEncryptionKeyTMR over-encryption key. This MUST be a cryptographically random NSData of 64 bytes.tmrAccessesFiltersRetrieval tmr accesses filters. If multiple TMR Accesses for this session are associated with the auth factor, filter out the unwanted ones.tryIfMultipleIf multiple accesses are found for this session associated with the auth factor, whether or not to loop over all of them to find the wanted one.useCacheWhether or not to use the cache (if enabled globally).completionHandlerA callback called after function execution. This callback takes two arguments, a SealdEncryptionSession* instance of the retrieved encryption session, and aNSError*that indicates if any error occurred.
retrieveMultipleEncryptionSessions:useCache:lookupProxyKey:lookupGroupKey:error:
- (NSArray< SealdEncryptionSession * > *) retrieveMultipleEncryptionSessions:(const NSArray< NSString * > *)sessionIds
useCache:(const BOOL)useCache
lookupProxyKey:(const BOOL)lookupProxyKey
lookupGroupKey:(const BOOL)lookupGroupKey
error:(NSError *_Nullable *)error;Retrieve multiple encryption sessions with an NSArray of sessionIds, and return an NSArray of the associated EncryptionSession instances, with which you can then encrypt / decrypt multiple messages. The returned array of EncryptionSession instances is in the same order as the input array.
Parameters
sessionIdsThe IDs of sessions to retrieve.useCacheWhether or not to use the cache (if enabled globally).lookupProxyKeyWhether or not to try retrieving the sessions via proxies.lookupGroupKeyWhether or not to try retrieving the sessions via groups.errorThe error that occurred while retrieving the sessions, if any.
Returns
The NSArray of retrieved SealdEncryptionSession instances, or null if an error occurred.
retrieveMultipleEncryptionSessionsAsync:useCache:lookupProxyKey:lookupGroupKey:completionHandler:
- (void) retrieveMultipleEncryptionSessionsAsync:(const NSArray< NSString * > *)sessionIds
useCache:(const BOOL)useCache
lookupProxyKey:(const BOOL)lookupProxyKey
lookupGroupKey:(const BOOL)lookupGroupKey
completionHandler:(void(^)(NSArray< SealdEncryptionSession * > *encryptionSessions, NSError *_Nullable error))completionHandler;Retrieve multiple encryption sessions with an NSArray of sessionIds, and return an NSArray of the associated EncryptionSession instances, with which you can then encrypt / decrypt multiple messages. The returned array of EncryptionSession instances is in the same order as the input array.
Parameters
sessionIdsThe IDs of sessions to retrieve.useCacheWhether or not to use the cache (if enabled globally).lookupProxyKeyWhether or not to try retrieving the sessions via proxies.lookupGroupKeyWhether or not to try retrieving the sessions via groups.completionHandlerA callback called after function execution. This callback takes two arguments, aNSArray<SealdEncryptionSession*>*instance of the retrieved encryption sessions, and aNSError*that indicates if any error occurred.
deserializeEncryptionSession:error:
- (SealdEncryptionSession *) deserializeEncryptionSession:(const NSString *_Nonnull)serializedSession
error:(NSError *_Nullable *)error;Deserialize a serialized session. For advanced use.
Parameters
serializedSessionThe serialized encryption session to deserialize.errorThe error that occurred while retrieving the session, if any.
Returns
The deserialized SealdEncryptionSession, or null if an error occurred.
getSealdIdsFromConnectors:error:
- (NSArray< NSString * > *) getSealdIdsFromConnectors:(const NSArray< SealdConnectorTypeValue * > *)connectorTypeValues
error:(NSError *_Nullable *)error;Get all the info for the given connectors to look for, updates the local cache of connectors, and returns a slice with the corresponding SealdIds. SealdIds are not de-duped and can appear for multiple connector values. If one of the connectors is not assigned to a Seald user, this will return a ErrorGetSealdIdsUnknownConnector error, with the details of the missing connector.
Parameters
connectorTypeValuesAn Array of ConnectorTypeValue instances.errorAn error pointer to fill in case of an error.
Returns
An Array of NSString with the Seald IDs of the users corresponding to these connectors.
getSealdIdsAsyncFromConnectors:completionHandler:
- (void) getSealdIdsAsyncFromConnectors:(const NSArray< SealdConnectorTypeValue * > *)connectorTypeValues
completionHandler:(void(^)(NSArray< NSString * > *sealdIds, NSError *_Nullable error))completionHandler;Get all the info for the given connectors to look for, updates the local cache of connectors, and returns a slice with the corresponding SealdIds. SealdIds are not de-duped and can appear for multiple connector values. If one of the connectors is not assigned to a Seald user, this will return a ErrorGetSealdIdsUnknownConnector error, with the details of the missing connector.
Parameters
connectorTypeValuesAn Array of ConnectorTypeValue instances.completionHandlerA callback called after function execution. This callback takes two arguments, an Array of NSString with the Seald IDs of the users corresponding to these connectors, and aNSError*that indicates if any error occurred.
getConnectorsFromSealdId:error:
- (NSArray< SealdConnector * > *) getConnectorsFromSealdId:(const NSString *)sealdId
error:(NSError *_Nullable *)error;List all connectors know locally for a given sealdId.
Parameters
sealdIdThe Seald ID for which to list connectorserrorAn error pointer to fill in case of an error.
Returns
An Array of Connector instances.
getConnectorsAsyncFromSealdId:completionHandler:
- (void) getConnectorsAsyncFromSealdId:(const NSString *)sealdId
completionHandler:(void(^)(NSArray< SealdConnector * > *connectors, NSError *_Nullable error))completionHandler;List all connectors know locally for a given sealdId.
Parameters
sealdIdThe Seald ID for which to list connectorscompletionHandlerA callback called after function execution. This callback takes two arguments, anNSArrayof SealdConnector* instances, and aNSError*that indicates if any error occurred.
addConnectorWithValue:connectorType:preValidationToken:error:
- (SealdConnector *) addConnectorWithValue:(const NSString *)value
connectorType:(const NSString *)connectorType
preValidationToken:(const SealdPreValidationToken *)preValidationToken
error:(NSError *_Nullable *)error;Add a connector to the current identity. If no preValidationToken is given, the connector will need to be validated before use.
Parameters
valueThe value of the connector to add.connectorTypeThe type of the connector.preValidationTokenGiven by your server to authorize the adding of a connector.errorAn error pointer to fill in case of an error.
Returns
The created Connector.
addConnectorAsyncWithValue:connectorType:preValidationToken:completionHandler:
- (void) addConnectorAsyncWithValue:(const NSString *)value
connectorType:(const NSString *)connectorType
preValidationToken:(const SealdPreValidationToken *)preValidationToken
completionHandler:(void(^)(SealdConnector *connector, NSError *_Nullable error))completionHandler;Add a connector to the current identity. If no preValidationToken is given, the connector will need to be validated before use.
Parameters
valueThe value of the connector to add.connectorTypeThe type of the connector.completionHandlerA callback called after function execution. This callback takes two arguments, a SealdConnector* instances of the added connector, and aNSError*that indicates if any error occurred.
validateConnector:challenge:error:
- (SealdConnector *) validateConnector:(const NSString *)connectorId
challenge:(const NSString *)challenge
error:(NSError *_Nullable *)error;Validate an added connector that was added without a preValidationToken.
Parameters
connectorIdThe ID of the connector to validate.challengeThe challenge.errorAn error pointer to fill in case of an error.
Returns
The modified Connector.
validateConnectorAsyncWithConnectorId:challenge:completionHandler:
- (void) validateConnectorAsyncWithConnectorId:(const NSString *)connectorId
challenge:(const NSString *)challenge
completionHandler:(void(^)(SealdConnector *connector, NSError *_Nullable error))completionHandler;Validate an added connector that was added without a preValidationToken.
Parameters
connectorIdThe ID of the connector to validate.challengeThe challenge.completionHandlerA callback called after function execution. This callback takes two arguments, a SealdConnector* instances of the validated connector, and aNSError*that indicates if any error occurred.
removeConnector:error:
- (SealdConnector *) removeConnector:(const NSString *)connectorId
error:(NSError *_Nullable *)error;Remove a connector belonging to the current account.
Parameters
connectorIdThe ID of the connector to remove.errorAn error pointer to fill in case of an error.
Returns
The modified Connector.
removeConnectorAsyncWithConnectorId:completionHandler:
- (void) removeConnectorAsyncWithConnectorId:(const NSString *)connectorId
completionHandler:(void(^)(SealdConnector *connector, NSError *_Nullable error))completionHandler;Remove a connector belonging to the current account.
Parameters
connectorIdThe ID of the connector to remove.completionHandlerA callback called after function execution. This callback takes two arguments, a SealdConnector* instances of the removed connector, and aNSError*that indicates if any error occurred.
listConnectorsWithError:
- (NSArray< SealdConnector * > *) listConnectorsWithError:(NSError *_Nullable *)error;List connectors associated to the current account.
Parameters
errorAn error pointer to fill in case of an error.
Returns
The array of connectors associated to the current account.
listConnectorsAsyncWithCompletionHandler:
- (void) listConnectorsAsyncWithCompletionHandler:(void(^)(NSArray< SealdConnector * > *connectors, NSError *_Nullable error))completionHandler;List connectors associated to the current account.
Parameters
completionHandlerA callback called after function execution. This callback takes two arguments, anNSArrayof SealdConnector* instances of the listed connectors, and aNSError*that indicates if any error occurred.
retrieveConnector:error:
- (SealdConnector *) retrieveConnector:(const NSString *)connectorId
error:(NSError *_Nullable *)error;Retrieve a connector by its connectorId, then updates the local cache of connectors.
Parameters
connectorIdThe ID of the connector to retrieve.errorAn error pointer to fill in case of an error.
Returns
The Connector.
retrieveConnectorAsyncWithConnectorId:completionHandler:
- (void) retrieveConnectorAsyncWithConnectorId:(const NSString *)connectorId
completionHandler:(void(^)(SealdConnector *connector, NSError *_Nullable error))completionHandler;Retrieve a connector by its connectorId, then updates the local cache of connectors.
Parameters
connectorIdThe ID of the connector to retrieve.completionHandlerA callback called after function execution. This callback takes two arguments, a SealdConnector* instance of the retrieved connector, and aNSError*that indicates if any error occurred.
massReencryptWithDeviceId:options:error:
- (SealdMassReencryptResponse *) massReencryptWithDeviceId:(const NSString *)deviceId
options:(const SealdMassReencryptOptions *)options
error:(NSError *_Nullable *)error;Retrieve, re-encrypt, and add missing keys for a certain device.
Parameters
deviceIdThe ID of the device for which to re-rencrypt.optionsA SealdMassReencryptOptions instance, ornilto use default options.errorAnNSErrorobject that will be populated if an error occurs while executing the operation.
Returns
A SealdMassReencryptResponse instance, containing the number of re-encrypted keys, and the number of keys for which re-encryption failed.
massReencryptAsyncWithDeviceId:options:completionHandler:
- (void) massReencryptAsyncWithDeviceId:(const NSString *)deviceId
options:(const SealdMassReencryptOptions *)options
completionHandler:(void(^)(SealdMassReencryptResponse *response, NSError *_Nullable error))completionHandler;Retrieve, re-encrypt, and add missing keys for a certain device.
Parameters
deviceIdThe ID of the device for which to re-rencrypt.optionsA SealdMassReencryptOptions instance, ornilto use default options.completionHandlerA callback called after function execution. This callback takes two arguments, a SealdMassReencryptResponse* instance containing the number of re-encrypted keys of the retrieved connector, and aNSError*that indicates if any error occurred.
devicesMissingKeysWithForceLocalAccountUpdate:error:
- (NSArray< SealdDeviceMissingKeys * > *) devicesMissingKeysWithForceLocalAccountUpdate:(const BOOL)forceLocalAccountUpdate
error:(NSError *_Nullable *)error;List which of the devices of the current account are missing keys, so you can call massReencryptWithDeviceId:options:error: for them.
Parameters
forceLocalAccountUpdateWhether to update the local accounterrorIf an error occurs, upon return contains an NSError object that describes the problem.
Returns
An NSArray of SealdDeviceMissingKeys instances, containing the ID of the device.
devicesMissingKeysAsyncWithForceLocalAccountUpdate:completionHandler:
- (void) devicesMissingKeysAsyncWithForceLocalAccountUpdate:(const BOOL)forceLocalAccountUpdate
completionHandler:(void(^)(NSArray< SealdDeviceMissingKeys * > *devices, NSError *_Nullable error))completionHandler;List which of the devices of the current account are missing keys, so you can call massReencryptWithDeviceId:options:error: for them.
Parameters
forceLocalAccountUpdateWhether to update the local accountcompletionHandlerA callback called after function execution. This callback takes two arguments, anNSArrayof SealdDeviceMissingKeys instances, containing the ID of the device, and aNSError*that indicates if any error occurred.
getSigchainHashWithUserId:position:error:
- (SealdGetSigchainResponse *) getSigchainHashWithUserId:(const NSString *)userId
position:(const NSInteger)position
error:(NSError *_Nullable *)error;Get a user's sigchain transaction hash at index position.
Parameters
userIdThe Seald ID of the concerned user.positionGet the hash at the given position. -1 to get the last. Default to -1.errorIf an error occurs, upon return contains an NSError object that describes the problem.
Returns
A SealdGetSigchainResponse instance.
getSigchainHashAsyncWithUserId:position:completionHandler:
- (void) getSigchainHashAsyncWithUserId:(const NSString *)userId
position:(const NSInteger)position
completionHandler:(void(^)(SealdGetSigchainResponse *response, NSError *_Nullable error))completionHandler;Get a user's sigchain transaction hash at index position.
Parameters
userIdThe Seald ID of the concerned user.positionGet the hash at the given position. -1 to get the last. Default to -1.completionHandlerA callback called after function execution. This callback takes two arguments, an SealdGetSigchainResponse instance containing the hash, and aNSError*that indicates if any error occurred.
checkSigchainHashWithUserId:expectedHash:position:error:
- (SealdCheckSigchainResponse *) checkSigchainHashWithUserId:(const NSString *)userId
expectedHash:(const NSString *)expectedHash
position:(const NSInteger)position
error:(NSError *_Nullable *)error;Verify if a given hash is included in the recipient's sigchain. Use the position option to check the hash of a specific sigchain transaction.
Parameters
userIdThe Seald ID of the concerned user.expectedHashThe expected sigchain hash.positionPosition of the sigchain transaction against which to check the hash. -1 to check if the hash exist in the sigchain. Default to -1.errorIf an error occurs, upon return contains an NSError object that describes the problem.
Returns
A SealdCheckSigchainResponse instance.
checkSigchainHashAsyncWithUserId:expectedHash:position:completionHandler:
- (void) checkSigchainHashAsyncWithUserId:(const NSString *)userId
expectedHash:(const NSString *)expectedHash
position:(const NSInteger)position
completionHandler:(void(^)(SealdCheckSigchainResponse *response, NSError *_Nullable error))completionHandler;Verify if a given hash is included in the recipient's sigchain. Use the position option to check the hash of a specific sigchain transaction.
Parameters
userIdThe Seald ID of the concerned user.expectedHashThe expected sigchain hash.positionPosition of the sigchain transaction against which to check the hash. -1 to check if the hash exist in the sigchain. Default to -1.completionHandlerA callback called after function execution. This callback takes two arguments, an SealdCheckSigchainResponse instance containing the response, and aNSError*that indicates if any error occurred.
convertTmrAccesses:overEncryptionKey:conversionFilters:deleteOnConvert:error:
- (SealdConvertTmrAccessesResult *) convertTmrAccesses:(const NSString *)tmrJWT
overEncryptionKey:(const NSData *)overEncryptionKey
conversionFilters:(const SealdTmrAccessesConvertFilters *_Nullable)conversionFilters
deleteOnConvert:(const BOOL)deleteOnConvert
error:(NSError *_Nullable *)error;Convert all TMR Accesses addressed to a given auth factor and matching specified filters to classic message keys. All TMR accesses matching the specified filters must have been encrypted with the same overEncryptionKey.
Parameters
tmrJWTThe TMR JWT.overEncryptionKeyTMR over-encryption key. This MUST be a cryptographically random NSData of 64 bytes.conversionFiltersConvert tmr accesses filters. If multiple TMR Accesses with the auth factor, filter out the unwanted ones.deleteOnConvertWhether or not to delete the TMR access after conversion.errorIf an error occurs, upon return contains an NSError object that describes the problem.
Returns
A SealdConvertTmrAccessesResult instance.
convertTmrAccessesAsync:overEncryptionKey:conversionFilters:deleteOnConvert:completionHandler:
- (void) convertTmrAccessesAsync:(const NSString *)tmrJWT
overEncryptionKey:(const NSData *)overEncryptionKey
conversionFilters:(const SealdTmrAccessesConvertFilters *_Nullable)conversionFilters
deleteOnConvert:(const BOOL)deleteOnConvert
completionHandler:(void(^)(SealdConvertTmrAccessesResult *response, NSError *_Nullable error))completionHandler;Convert all TMR Accesses addressed to a given auth factor and matching specified filters to classic message keys. All TMR accesses matching the specified filters must have been encrypted with the same overEncryptionKey.
Parameters
tmrJWTThe TMR JWT.overEncryptionKeyTMR over-encryption key. This MUST be a cryptographically random NSData of 64 bytes.conversionFiltersConvert tmr accesses filters. If multiple TMR Accesses with the auth factor, filter out the unwanted ones.deleteOnConvertWhether or not to delete the TMR access after conversion.completionHandlerA callback called after function execution. This callback takes two arguments, a SealdConvertTmrAccessesResult instance containing the response, and aNSError*that indicates if any error occurred.
createGroupTMRTemporaryKeyWithGroupId:authFactor:isAdmin:rawOverEncryptionKey:error:
- (SealdGroupTmrTemporaryKey *) createGroupTMRTemporaryKeyWithGroupId:(const NSString *)groupId
authFactor:(const SealdTmrAuthFactor *)authFactor
isAdmin:(const BOOL)isAdmin
rawOverEncryptionKey:(const NSData *)rawOverEncryptionKey
error:(NSError *_Nullable *)error;Create a group TMR temporary key, and returns the created GroupTmrTemporaryKey instance.
Parameters
groupIdThe Id of the group for which to create a TMR key.authFactorAuthentication method of this user, to which SSKS has sent a challenge at the request of your app's server.isAdminShould this TMR temporary key give the group admin status.rawOverEncryptionKeyTMR over-encryption key. This MUST be a cryptographically random buffer of 64 bytes.errorIf an error occurs, upon return contains an NSError object that describes the problem.
Returns
A SealdGroupTmrTemporaryKey instance.
createGroupTMRTemporaryKeyAsyncWithGroupId:authFactor:isAdmin:rawOverEncryptionKey:completionHandler:
- (void) createGroupTMRTemporaryKeyAsyncWithGroupId:(const NSString *)groupId
authFactor:(const SealdTmrAuthFactor *)authFactor
isAdmin:(const BOOL)isAdmin
rawOverEncryptionKey:(const NSData *)rawOverEncryptionKey
completionHandler:(void(^)(SealdGroupTmrTemporaryKey *response, NSError *_Nullable error))completionHandler;Create a group TMR temporary key, and returns the created GroupTmrTemporaryKey instance.
Parameters
groupIdThe Id of the group for which to create a TMR key.authFactorAuthentication method of this user, to which SSKS has sent a challenge at the request of your app's server.isAdminShould this TMR temporary key give the group admin status.rawOverEncryptionKeyTMR over-encryption key. This MUST be a cryptographically random buffer of 64 bytes.completionHandlerA callback called after function execution. This callback takes two arguments, an SealdGroupTmrTemporaryKey instance containing the response, and aNSError*that indicates if any error occurred.
listGroupTMRTemporaryKeysWithGroupId:page:all:error:
- (SealdListedGroupTMRTemporaryKeys *) listGroupTMRTemporaryKeysWithGroupId:(const NSString *)groupId
page:(const NSInteger)page
all:(const BOOL)all
error:(NSError *_Nullable *)error;List group TMR temporary keys.
Parameters
groupIdThe Id of the group for which to list TMR keys.pagePage number to fetch.allShould list all pages afterpage.errorIf an error occurs, upon return contains an NSError object that describes the problem.
Returns
A SealdListedGroupTMRTemporaryKeys instance.
listGroupTMRTemporaryKeysAsyncWithGroupId:page:all:completionHandler:
- (void) listGroupTMRTemporaryKeysAsyncWithGroupId:(const NSString *)groupId
page:(const NSInteger)page
all:(const BOOL)all
completionHandler:(void(^)(SealdListedGroupTMRTemporaryKeys *response, NSError *_Nullable error))completionHandler;List group TMR temporary keys.
Parameters
groupIdThe Id of the group for which to list TMR keys.pagePage number to fetch.allShould list all pages afterpage.completionHandlerA callback called after function execution. This callback takes two arguments, a SealdListedGroupTMRTemporaryKeys instance containing the response, and aNSError*that indicates if any error occurred.
searchGroupTMRTemporaryKeysWithTmrJWT:options:error:
- (SealdListedGroupTMRTemporaryKeys *) searchGroupTMRTemporaryKeysWithTmrJWT:(const NSString *)tmrJWT
options:(SealdSearchGroupTMRTemporaryKeys *_Nullable)options
error:(NSError *_Nullable *)error;Search group TMR temporary keys that can be used with the TMR JWT.
Parameters
tmrJWTTMR JWT to use.optionsOption to filter the search results.errorIf an error occurs, upon return contains an NSError object that describes the problem.
Returns
A SealdListedGroupTMRTemporaryKeys instance.
searchGroupTMRTemporaryKeysAsyncWithTmrJWT:options:completionHandler:
- (void) searchGroupTMRTemporaryKeysAsyncWithTmrJWT:(const NSString *)tmrJWT
options:(SealdSearchGroupTMRTemporaryKeys *_Nullable)options
completionHandler:(void(^)(SealdListedGroupTMRTemporaryKeys *response, NSError *_Nullable error))completionHandler;Search group TMR temporary keys that can be used with the TMR JWT.
Parameters
tmrJWTTMR JWT to use.optionsOption to filter the search results.completionHandlerA callback called after function execution. This callback takes two arguments, an SealdListedGroupTMRTemporaryKeys instance containing the response, and aNSError*that indicates if any error occurred.
convertGroupTMRTemporaryKeyWithGroupId:temporaryKeyId:tmrJWT:rawOverEncryptionKey:deleteOnConvert:error:
- (void) convertGroupTMRTemporaryKeyWithGroupId:(const NSString *)groupId
temporaryKeyId:(const NSString *)temporaryKeyId
tmrJWT:(const NSString *)tmrJWT
rawOverEncryptionKey:(const NSData *)rawOverEncryptionKey
deleteOnConvert:(const BOOL)deleteOnConvert
error:(NSError *_Nullable *)error;Convert a group TMR temporary key to become a group member.
Parameters
groupIdThe Id of the group for which to convert a TMR key.temporaryKeyIdId of the TMR temporary key to converttmrJWTTMR JWT to userawOverEncryptionKeyThe raw encryption key to use. This MUST be a cryptographically random buffer of 64 bytes.deleteOnConvertShould the temporary key be deleted after conversion.errorIf an error occurs, upon return contains an NSError object that describes the problem.
convertGroupTMRTemporaryKeyAsyncWithGroupId:temporaryKeyId:tmrJWT:rawOverEncryptionKey:deleteOnConvert:completionHandler:
- (void) convertGroupTMRTemporaryKeyAsyncWithGroupId:(const NSString *)groupId
temporaryKeyId:(const NSString *)temporaryKeyId
tmrJWT:(const NSString *)tmrJWT
rawOverEncryptionKey:(const NSData *)rawOverEncryptionKey
deleteOnConvert:(const BOOL)deleteOnConvert
completionHandler:(void(^)(NSError *_Nullable error))completionHandler;Convert a group TMR temporary key to become a group member.
Parameters
groupIdThe Id of the group for which to convert a TMR key.temporaryKeyIdId of the TMR temporary key to converttmrJWTTMR JWT to userawOverEncryptionKeyThe raw encryption key to use. This MUST be a cryptographically random buffer of 64 bytes.deleteOnConvertShould the temporary key be deleted after conversion.completionHandlerA callback called after function execution. This callback takes one argument, aNSError*that indicates if any error occurred.
deleteGroupTMRTemporaryKeyWithGroupId:temporaryKeyId:error:
- (void) deleteGroupTMRTemporaryKeyWithGroupId:(const NSString *)groupId
temporaryKeyId:(const NSString *)temporaryKeyId
error:(NSError *_Nullable *)error;Delete a group TMR temporary key.
Parameters
groupIdThe Id of the group for which to delete a TMR key.temporaryKeyIdId of the TMR key to delete.errorIf an error occurs, upon return contains an NSError object that describes the problem.
deleteGroupTMRTemporaryKeyAsyncWithGroupId:temporaryKeyId:completionHandler:
- (void) deleteGroupTMRTemporaryKeyAsyncWithGroupId:(const NSString *)groupId
temporaryKeyId:(const NSString *)temporaryKeyId
completionHandler:(void(^)(NSError *_Nullable error))completionHandler;Delete a group TMR temporary key.
Parameters
groupIdThe Id of the group for which to delete a TMR key.temporaryKeyIdId of the TMR key to delete.completionHandlerA callback called after function execution. This callback takes one argument, aNSError*that indicates if any error occurred.