Skip to content

Commit

Permalink
pass hex strings
Browse files Browse the repository at this point in the history
Signed-off-by: Bob Callaway <[email protected]>
  • Loading branch information
bobcallaway committed Nov 2, 2024
1 parent 1561134 commit 1be87c2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/tle/tle.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 1be87c2

Please sign in to comment.