data

package
v0.0.0-...-b01a591 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package data contains data models for internal types

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PathHexDigest

func PathHexDigest(s string) string

PathHexDigest returns SHA256 hex digest of the byte array. 4.5. File formats: targets.json and delegated target roles: ...each target path, when hashed with the SHA-256 hash function to produce a 64-byte hexadecimal digest (HEX_DIGEST)...

Types

type HexBytes

type HexBytes []byte

HexBytes is a byte slice that can be encoded to and decoded from a string.

func (HexBytes) MarshalJSON

func (b HexBytes) MarshalJSON() ([]byte, error)

MarshalJSON encodes a byte array into a json hex string.

func (HexBytes) String

func (b HexBytes) String() string

String returns the hex string representation of the byte array.

func (*HexBytes) UnmarshalJSON

func (b *HexBytes) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes a json hex string into a byte array.

Jump to

Keyboard shortcuts

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