Use libhex

Rather than our own wheel.

Test: TH
Change-Id: Ied0d5d492597b247e7da561e73e318271186bbb0
diff --git a/compos/Android.bp b/compos/Android.bp
index 19123dd..b840506 100644
--- a/compos/Android.bp
+++ b/compos/Android.bp
@@ -14,6 +14,7 @@
         "libanyhow",
         "libbinder_rs",
         "libcompos_common",
+        "libhex",
         "liblibc",
         "liblog_rust",
         "libminijail_rust",
diff --git a/compos/src/artifact_signer.rs b/compos/src/artifact_signer.rs
index 76da00a..bfd886e 100644
--- a/compos/src/artifact_signer.rs
+++ b/compos/src/artifact_signer.rs
@@ -53,7 +53,7 @@
 
         let file = File::open(path).with_context(|| format!("Opening {}", path.display()))?;
         let digest = fsverity::measure(file.as_fd())?;
-        let digest = to_hex_string(&digest);
+        let digest = hex::encode(digest);
 
         self.file_digests.push((target_path.to_owned(), digest));
         Ok(())
@@ -82,7 +82,3 @@
         Ok(())
     }
 }
-
-fn to_hex_string(buf: &[u8]) -> String {
-    buf.iter().map(|b| format!("{:02x}", b)).collect()
-}