SealdSsksTMRPlugin_SaveIdentity method
- Pointer<
NativeSealdSsksTMRPlugin> tmrPlugin, - Pointer<
Utf8> sessionId, - Pointer<
Utf8> authFactorType, - Pointer<
Utf8> authFactorValue, - Pointer<
Uint8> rawTMRSymKey, - int rawTMRSymKeyLen,
- Pointer<
Uint8> identity, - int identityLen,
- Pointer<
Utf8> challenge, - Pointer<
Pointer< result,NativeSealdSsksTMRPluginSaveIdentityResponse> > - Pointer<
Pointer< error,NativeSealdError> >
Save the Seald account to SSKS.
@param tmrPlugin The SSKS TMR plugin instance.
@param sessionId The user's session ID.
@param authFactorType The type of authentication factor. Can be "EM" or "SMS".
@param authFactorValue The value of authentication factor.
@param rawTMRSymKey The raw encryption key used to encrypt / decrypt the stored identity keys. This MUST be a cryptographically random buffer of 64 bytes.
@param rawTMRSymKeyLen The length of rawTMRSymKey.
@param identity The identity to save.
@param identityLen The length of identity.
@param challenge Optional. The challenge sent by SSKS to the user's authentication method, if any.
@param result A pointer to a SealdSsksTMRPluginSaveIdentityResponse*.
@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 SealdSsksTMRPlugin_SaveIdentity(
ffi.Pointer<NativeSealdSsksTMRPlugin> tmrPlugin,
ffi.Pointer<pkg_ffi.Utf8> sessionId,
ffi.Pointer<pkg_ffi.Utf8> authFactorType,
ffi.Pointer<pkg_ffi.Utf8> authFactorValue,
ffi.Pointer<ffi.Uint8> rawTMRSymKey,
int rawTMRSymKeyLen,
ffi.Pointer<ffi.Uint8> identity,
int identityLen,
ffi.Pointer<pkg_ffi.Utf8> challenge,
ffi.Pointer<ffi.Pointer<NativeSealdSsksTMRPluginSaveIdentityResponse>>
result,
ffi.Pointer<ffi.Pointer<NativeSealdError>> error,
) {
return _SealdSsksTMRPlugin_SaveIdentity(
tmrPlugin,
sessionId,
authFactorType,
authFactorValue,
rawTMRSymKey,
rawTMRSymKeyLen,
identity,
identityLen,
challenge,
result,
error,
);
}