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 from the SDK when the signing identity PIN is required.


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

Create 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 from the SDK, when the signing identity PIN is required.

resultHandler

a callback to handle the result of the signing.

  • If successful, the result is MIRACLSuccess.

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