SealdSdk_CreateGroupTMRTemporaryKey method

int SealdSdk_CreateGroupTMRTemporaryKey(
  1. Pointer<NativeSealdSdk> sealdSdk,
  2. Pointer<Utf8> groupId,
  3. Pointer<Utf8> authFactorType,
  4. Pointer<Utf8> authFactorValue,
  5. int isAdmin,
  6. Pointer<Uint8> rawOverEncryptionKey,
  7. int rawOverEncryptionKeyLen,
  8. Pointer<Pointer<NativeSealdGroupTMRTemporaryKey>> result,
  9. Pointer<Pointer<NativeSealdError>> error,
)

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

@param sealdSdk The SealdSdk instance. @param groupId The Id of the group for which to create a TMR key. @param authFactorType The type of authentication factor. Can be "EM" or "SMS". @param authFactorValue The value of authentication factor. @param isAdmin Should this TMR temporary key give the group admin status. 1 for admin, 0 otherwise. @param rawOverEncryptionKey The raw encryption key to use. This MUST be a cryptographically random buffer of 64 bytes. @param rawOverEncryptionKeyLen The length of rawOverEncryptionKey. @param result A pointer where to store the created SealdGroupTMRTemporaryKey instance. @param error A pointer to a SealdError* where details will be stored in case of error. @return Error code: -1 if an error happened, 0 for success.

Implementation

int SealdSdk_CreateGroupTMRTemporaryKey(
  ffi.Pointer<NativeSealdSdk> sealdSdk,
  ffi.Pointer<pkg_ffi.Utf8> groupId,
  ffi.Pointer<pkg_ffi.Utf8> authFactorType,
  ffi.Pointer<pkg_ffi.Utf8> authFactorValue,
  int isAdmin,
  ffi.Pointer<ffi.Uint8> rawOverEncryptionKey,
  int rawOverEncryptionKeyLen,
  ffi.Pointer<ffi.Pointer<NativeSealdGroupTMRTemporaryKey>> result,
  ffi.Pointer<ffi.Pointer<NativeSealdError>> error,
) {
  return _SealdSdk_CreateGroupTMRTemporaryKey(
    sealdSdk,
    groupId,
    authFactorType,
    authFactorValue,
    isAdmin,
    rawOverEncryptionKey,
    rawOverEncryptionKeyLen,
    result,
    error,
  );
}