tdppVerify

fun tdppVerify(base: String, params: Map<String, String>, addressData: ByteArray, sig: ByteArray): Boolean

Check a TDPP request signature sig against the address data addressData (PayAddress.data). Accepts a signature over either signer form (see tdppSignedMessages), on every platform. A request with a parameter name that is not plain (see tdppPlainParamNames) never verifies. This takes a map, so it cannot see a repeated name: to check a received request use the overload that takes the query's (name, value) pairs, which also refuses repeats.

Return

true if the signature matches one of the forms


fun tdppVerify(base: String, query: List<Pair<String, String>>, addressData: ByteArray, sig: ByteArray): Boolean

Check a received TDPP request's signature. query is every (decoded name, decoded value) pair of the request's query, in order, including "sig" if present (it is left out of the message). A request that repeats a name never verifies: a map would keep one of the values while a handler may read another, so the signature could cover a value the handler never sees.

Return

true if the signature matches one of the forms (see tdppVerify)