saveIdentityAsync method
Save the Seald account to SSKS.
sessionId
- The user's session ID.
authFactorType
- The type of authentication factor. Can be "EM" or "SMS".
authFactorValue
- The value of authentication factor.
rawTMRSymKey
- The raw encryption key used to encrypt / decrypt the stored identity keys. This MUST be a cryptographically random buffer of 64 bytes.
identity
- The identity to save.
challenge
- The challenge sent by SSKS to the user's authentication method.
Returns a SealdSsksTMRPluginSaveIdentityResponse containing the SSKS ID of the stored identity.
Implementation
Future<SealdSsksTMRPluginSaveIdentityResponse> saveIdentityAsync(
String sessionId,
String authFactorType,
String authFactorValue,
Uint8List rawTMRSymKey,
Uint8List identity,
{String? challenge}) {
final _TransferablePointer<NativeSealdSsksTMRPlugin> tPtr = _ptr;
return compute(
(Map<String, dynamic> args) => SealdSsksTMRPlugin._(tPtr).saveIdentity(
args["sessionId"],
args["authFactorType"],
args["authFactorValue"],
args["rawTMRSymKey"],
args["identity"],
challenge: args["challenge"],
),
{
"sessionId": sessionId,
"authFactorType": authFactorType,
"authFactorValue": authFactorValue,
"rawTMRSymKey": rawTMRSymKey,
"identity": identity,
"challenge": challenge
});
}