retrieveIdentityFromPasswordAsync method
Retrieve the identity stored on the SSKS server for the given userId, and decrypt it with the given password.
If you use an incorrect password multiple times, the server may throttle your requests. In this case, you will
receive an error Request throttled, retry after {N}s
, with {N}
the number of seconds during which you
cannot try again.
userId
- The ID of the user.
password
- The password to encrypt the key.
identity
- The identity to save.
Returns a Uint8List containing the retrieved identity.
Implementation
Future<Uint8List> retrieveIdentityFromPasswordAsync(
String userId, String password) {
final _TransferablePointer<NativeSealdSsksPasswordPlugin> tPtr = _ptr;
return compute(
(Map<String, dynamic> args) => SealdSsksPasswordPlugin._(tPtr)
.retrieveIdentityFromPassword(args["userId"], args["password"]),
{"userId": userId, "password": password});
}