isDerPublicKey function
Implementation
bool isDerPublicKey(Uint8List pub, Uint8List oid) {
final oidLength = oid.length;
if (!pub.sublist(0, oidLength).eq(oid)) {
return false;
} else {
try {
return bytesWrapDer(bytesUnwrapDer(pub, oid), oid).eq(pub);
} catch (e) {
return false;
}
}
}