From 1be87c235c40f64ecea9de0cf4acece2a628c8a2 Mon Sep 17 00:00:00 2001 From: Bob Callaway Date: Sat, 2 Nov 2024 19:06:49 -0400 Subject: [PATCH] pass hex strings Signed-off-by: Bob Callaway --- pkg/tle/tle.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/tle/tle.go b/pkg/tle/tle.go index 2ce2bac5d..5467484e9 100644 --- a/pkg/tle/tle.go +++ b/pkg/tle/tle.go @@ -117,16 +117,17 @@ func GenerateLogEntry(tle *rekor_pb.TransparencyLogEntry) models.LogEntry { return nil } + //TODO: do we have the information to prefix the tree ID onto this? entryUUID := hex.EncodeToString(rfc6962.DefaultHasher.HashLeaf(tle.CanonicalizedBody)) inclusionProofHashes := []string{} for _, hash := range tle.InclusionProof.Hashes { - inclusionProofHashes = append(inclusionProofHashes, base64.StdEncoding.EncodeToString(hash)) + inclusionProofHashes = append(inclusionProofHashes, hex.EncodeToString(hash)) } return models.LogEntry{ entryUUID: models.LogEntryAnon{ Body: base64.StdEncoding.EncodeToString(tle.CanonicalizedBody), IntegratedTime: swag.Int64(tle.IntegratedTime), - LogID: swag.String(tle.LogId.String()), + LogID: swag.String(hex.EncodeToString(tle.LogId.KeyId)), LogIndex: swag.Int64(tle.LogIndex), Verification: &models.LogEntryAnonVerification{ InclusionProof: &models.InclusionProof{