package com.vivo.push.d; import android.text.TextUtils; import android.util.Base64; import com.vivo.push.e; import com.vivo.push.l; import com.vivo.push.o; import com.vivo.push.sdk.PushMessageCallback; import com.vivo.push.util.p; import com.vivo.push.util.u; import java.security.PublicKey; /* compiled from: OnReceiveTask */ public abstract class z extends l { protected PushMessageCallback b; z(o oVar) { super(oVar); } public final void a(PushMessageCallback pushMessageCallback) { this.b = pushMessageCallback; } public final boolean a(PublicKey publicKey, String str, String str2) { if (!e.a().d()) { p.d("OnVerifyCallBackCommand", "vertify is not support , vertify is ignore"); return true; } else if (publicKey == null) { p.d("OnVerifyCallBackCommand", "vertify key is null"); return false; } else if (TextUtils.isEmpty(str)) { p.d("OnVerifyCallBackCommand", "contentTag is null"); return false; } else if (!TextUtils.isEmpty(str2)) { try { p.d("OnVerifyCallBackCommand", str.hashCode() + " = " + str2); if (u.a(str.getBytes("UTF-8"), publicKey, Base64.decode(str2, 2))) { p.d("OnVerifyCallBackCommand", "vertify id is success"); return true; } p.d("OnVerifyCallBackCommand", "vertify fail srcDigest is ".concat(String.valueOf(str))); p.c(this.a, "vertify fail srcDigest is ".concat(String.valueOf(str))); return false; } catch (Exception e) { e.printStackTrace(); p.d("OnVerifyCallBackCommand", "vertify exception"); return false; } } else { p.d("OnVerifyCallBackCommand", "vertify id is null"); return false; } } }