- Convert private data hash to string
Re: Convert private data hash to string
Brett T Logan <brett.t.logan@...>
toggle quoted messageShow quoted text
Byte slices in Go can be cast directly to strings `string(bytes)`
Software Engineer, IBM Blockchain
----- Original message -----
From: "Harris Niavis" <harniavis@...>
Sent by: fabric@...
Subject: [EXTERNAL] [Hyperledger Fabric] Convert private data hash to string
Date: Mon, May 25, 2020 6:09 PM
I am looking for a way to check the hash on the ledger, produced by the private data collection, I use the GetPrivateDataHash function in the chaincode, which returns the hash in bytes.
How can I umarshal and convert this to string? Do I need to know the bytes encoding structure?
Yale Institute of Network Science (YINS)
Join email@example.com to automatically receive all group messages.