util

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIsProofModeFile

func CheckIsProofModeFile(filePath string) bool

CheckIsProofModeFile checks if the file is a proofmode file

func GetMapOfZipFiles

func GetMapOfZipFiles(zipListing *zip.ReadCloser) (map[string]*zip.File, [][]byte, error)

GetMapOfZipFiles reads the files mapping and JSON metadata in the zip

Types

type ProofModeAssetMetadata

type ProofModeAssetMetadata struct {
	Sha256         string `json:"File Hash SHA256"`
	FilePath       string `json:"File Path"`
	FileModified   string `json:"File Modified"`
	FileCreated    string `json:"File Created"`
	ProofGenerated string `json:"Proof Generated"`
	Note           string `json:"Note"`
}

type ProofModeFileData

type ProofModeFileData struct {
	AssetSignature    []byte
	MetadataBytes     []byte
	MetadataSignature []byte
	PubKey            []byte
	Ots               []byte
	Gst               []byte
	Sha256            string
	Md5               string
	Blake3            string
	FileSize          uint64
	MediaType         string
	Metadata          *ProofModeAssetMetadata
}

func ReadAndVerifyMetadata

func ReadAndVerifyMetadata(filePath string) ([]*ProofModeFileData, error)

ReadAndVerifyProofModeMetadata reads and verifies a proof mode file and returns its metadata

Jump to

Keyboard shortcuts

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