matchAsymmetricKeys static method
Verifies that an asymmetric key pair (sign/verify) are a matching pair.
Tests if the private (signing) key can sign the PROMISE data, and the public (verification) key can successfully verify that signature.
sKey is the private/signing key to test.
pKey is the public/verification key to test.
Returns true if keys are a valid matching pair, false otherwise.
Implementation
static bool matchAsymmetricKeys(SignKey sKey, VerifyKey pKey) {
// verify with signature
Uint8List signature = sKey.sign(PROMISE);
return pKey.verify(PROMISE, signature);
}