Implementation
static Future<bool> verifyAll(
CryptoRSAPublicKey key, Map<Uint8List, Uint8List> req) {
Map<String, String> q = req.map(
(key, value) => MapEntry(base64.encode(key), base64.encode(value)));
q['CRYPTORSAPUBLICKEY'] = key.encode();
return compute((Map<String, String> q) {
CryptoRSAPublicKey aes =
CryptoRSAPublicKey.decode(q.remove('CRYPTORSAPUBLICKEY')!);
for (MapEntry<String, String> entry in q.entries) {
if (!verify(
aes, base64.decode(entry.key), base64.decode(entry.value))) {
return false;
}
}
return true;
}, q)
.then((isVerified) => isVerified);
}