# sign

fun sign(message: ByteArray, timestamp: Date, user: User, pinProvider: PinProvider, resultHandler: ResultHandler<Signature, MIRACLException>)

Create a cryptographic signature of the given document.

# Parameters

message the hash of the given document.
timestamp when the document is signed.
user an user with already registered signing identity.
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 a message. On exception, the exception object is also passed.