mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-16 12:23:07 +00:00
get digest bytes
This commit is contained in:
parent
9e076ae349
commit
9cd2af6cec
7
codex/utils/digest.nim
Normal file
7
codex/utils/digest.nim
Normal file
@ -0,0 +1,7 @@
|
||||
import pkg/libp2p/multihash
|
||||
|
||||
template bytes*(mh: MultiHash): seq[byte] =
|
||||
## get the hash bytes of a multihash object
|
||||
##
|
||||
|
||||
mh.data.buffer[mh.dpos..(mh.dpos + mh.size - 1)]
|
||||
Loading…
x
Reference in New Issue
Block a user