大家好,我正在尝试在xamarin 表单 android应用程序中实施防篡改保护并验证应用程序签名。目前我正在使用这段代码:
var context = Android.App.Application.Context;
Signature sigs = context.PackageManager.GetPackageInfo(context.PackageName, PackageInfoFlags.Signatures).Signatures[0];
DisplayAlert("sigs.ToString()", sigs.ToString(), "ok"); //1331014879
DisplayAlert(" sigs.GetHashCode().ToString()", sigs.GetHashCode().ToString(), "ok"); // android.content.pm.Signature@4f55acdf
sigs.GetHashCode().ToString()返回1331014879
sigs.ToString()返回android.content.pm.Signature@4f55acdf
但我想我可能做错了。这是在运行时验证 android 应用程序签名的正确方法吗?否则请给我代码和指导。谢谢。