sign

suspend fun sign(message: ByteArray, user: User, pinProvider: PinProvider): MIRACLResult<SigningResult, SigningException>

Creates a cryptographic signature of the given document.

Return

A MIRACLResult representing the result of the signing operation:

Parameters

message

The hash of the given document.

user

A user to sign with.

pinProvider

A callback called by the SDK when the PIN is requested.


fun sign(message: ByteArray, user: User, pinProvider: PinProvider, resultHandler: ResultHandler<SigningResult, SigningException>)

Creates a cryptographic signature of the given document.

Parameters

message

The hash of the given document.

user

A user to sign with.

pinProvider

A callback called by the SDK when the PIN is requested.

resultHandler

A callback to handle the result of the signing.

  • If successful, the result is a MIRACLSuccess.

  • If an error occurs, the result is a MIRACLError with an exception describing issues with the operation.