createGroupTMRTemporaryKeyAsync method

Future<SealdGroupTMRTemporaryKey> createGroupTMRTemporaryKeyAsync(
  1. String groupId,
  2. String authFactorType,
  3. String authFactorValue,
  4. Uint8List rawOverEncryptionKey, {
  5. bool isAdmin = false,
})

Create a group TMR temporary key, and returns the created SealdGroupTMRTemporaryKey instance.

groupId The Id of the group for which to create a TMR key. authFactorType The type of authentication factor. Can be "EM" or "SMS". authFactorValue The value of authentication factor. rawOverEncryptionKey The raw encryption key to use. This MUST be a cryptographically random buffer of 64 bytes. isAdmin Should this TMR temporary key give the group admin status. Returns a SealdGroupTMRTemporaryKey instance.

Implementation

Future<SealdGroupTMRTemporaryKey> createGroupTMRTemporaryKeyAsync(
    String groupId,
    String authFactorType,
    String authFactorValue,
    Uint8List rawOverEncryptionKey,
    {bool isAdmin = false}) {
  return compute(
      (Map<String, dynamic> args) => createGroupTMRTemporaryKey(
          args["groupId"],
          args["authFactorType"],
          args["authFactorValue"],
          args["rawOverEncryptionKey"],
          isAdmin: args["isAdmin"]),
      {
        "groupId": groupId,
        "authFactorType": authFactorType,
        "authFactorValue": authFactorValue,
        "rawOverEncryptionKey": rawOverEncryptionKey,
        "isAdmin": isAdmin
      });
}