How to decode signed, state, event hashes

Hello, when I checked the first version by libra-grpc, which I got 3 hashes:
signed_transaction_hash: ‘BGT2M6UYUTfrl3DyRbQRlip818rdmBjrM2Q7z43/I8Q=’,
state_root_hash: ‘7bV3K6oJdfbeKPuuESDb5iXErKI3i2r3JxW2VoH4pDk=’,

according to librabrowser, there’s decoded results:

Signed Transaction Hash: 2b45dd1dbbc034dc2dc1a932b8d881796b5acd9773b7b8a23a2c1d40a9f87052|

State Root: 6faa045f4cf9eff81b2ae6f9e9ac8ec392296af05943f7e8c92b0fc946e14741|

Event Root Hash: 414343554d554c41544f525f504c414345484f4c4445525f4841534800000000|

My question is which algorithm to decode the above hashes, thank you :slight_smile:


Hi @pthor11, they are simply different encodings, in your case Base64, versus hex.

Note that the underlying data that passes through RPC for those hashes are always raw bytes. The encoding you see is probably the default behavior of your programming language.

For example, golang json package encodes raw bytes into base64 strings.

1 Like

Thankyou @the729 , I resolved this problem.