hashes

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeFileCID

func ComputeFileCID(f io.ReadSeeker) (string, error)

copy pasted from https://github.com/AudiusProject/audius-protocol/blob/main/mediorum/cidutil/cidutil.go#L39

sadly we did not set up the cid builder correctly so our cids use 0x00 (raw identity) instead of 0x12 (SHA2_256) (see: https://github.com/multiformats/multihash)

we could fix this in the future, but we'll always have "0x00" cids around

func Decode

func Decode(hid string) (int, error)

func Encode

func Encode(id int) (string, error)

func MaybeDecode

func MaybeDecode(hid string) (int, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL