package u1; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import m2.k; import n2.a; /* loaded from: classes.dex */ public class j { /* renamed from: a, reason: collision with root package name */ private final m2.g f14665a = new m2.g(1000); /* renamed from: b, reason: collision with root package name */ private final y.e f14666b = n2.a.d(10, new a()); class a implements a.d { a() { } @Override // n2.a.d /* renamed from: b, reason: merged with bridge method [inline-methods] */ public b a() { try { return new b(MessageDigest.getInstance("SHA-256")); } catch (NoSuchAlgorithmException e10) { throw new RuntimeException(e10); } } } private static final class b implements a.f { /* renamed from: a, reason: collision with root package name */ final MessageDigest f14668a; /* renamed from: b, reason: collision with root package name */ private final n2.c f14669b = n2.c.a(); b(MessageDigest messageDigest) { this.f14668a = messageDigest; } @Override // n2.a.f public n2.c c() { return this.f14669b; } } private String a(q1.f fVar) { b bVar = (b) m2.j.d(this.f14666b.b()); try { fVar.a(bVar.f14668a); return k.v(bVar.f14668a.digest()); } finally { this.f14666b.a(bVar); } } public String b(q1.f fVar) { String str; synchronized (this.f14665a) { str = (String) this.f14665a.g(fVar); } if (str == null) { str = a(fVar); } synchronized (this.f14665a) { this.f14665a.k(fVar, str); } return str; } }