saveIdentityFromPasswordAsync method

Future<String> saveIdentityFromPasswordAsync(
  1. String userId,
  2. String password,
  3. Uint8List identity
)

Save the given identity for the given userId, encrypted with the given password.

userId - The ID of the user. password - The password to encrypt the key. identity - The identity to save.

Returns the SSKS ID of the stored identity, which can be used by your backend to manage it.

Implementation

Future<String> saveIdentityFromPasswordAsync(
    String userId, String password, Uint8List identity) {
  final _TransferablePointer<NativeSealdSsksPasswordPlugin> tPtr = _ptr;
  return compute(
      (Map<String, dynamic> args) => SealdSsksPasswordPlugin._(tPtr)
          .saveIdentityFromPassword(
              args["userId"], args["password"], args["identity"]),
      {"userId": userId, "password": password, "identity": identity});
}