Cert Management UI V2: fix inconsistent calculation of sha256hash_hex key

Most of the production code was setting to lowercase with one
exception, ServerCertificateDatabaseNSSMigrator. Tests were more mixed
on which case was used. This change makes everything use lowercase.

Add a constructor on CertInformation class that initializes it and
switch all the places creating CertInformation objects to use that, so
that they are all consistent.

Bug: 40928765
Change-Id: Ic457772d8f5f21bd79729081c971d24fa9451b0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072131
Reviewed-by: Hubert Chao <[email protected]>
Reviewed-by: Kyle Horimoto <[email protected]>
Auto-Submit: Matt Mueller <[email protected]>
Commit-Queue: Kyle Horimoto <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1394431}
diff --git a/chrome/browser/net/server_certificate_database.h b/chrome/browser/net/server_certificate_database.h
index 09b4309e..cfa0fc2 100644
--- a/chrome/browser/net/server_certificate_database.h
+++ b/chrome/browser/net/server_certificate_database.h
@@ -23,6 +23,9 @@
 class ServerCertificateDatabase {
  public:
   struct CertInformation {
+    // Initializes a CertInformation object with the `der_cert` and calculates
+    // the `sha256hash_hex` from the supplied cert.
+    explicit CertInformation(base::span<const uint8_t> cert);
     CertInformation();
     ~CertInformation();
     CertInformation(CertInformation&&);