util

package
v2.0.0-...-8205865 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package util contains small helpers used across the repo

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUint48

func AddUint48(b *cryptobyte.Builder, v uint64)

AddUint48 appends a big-endian, 48-bit value to the byte string. Remove if / when https://github.com/golang/crypto/pull/265 is merged upstream.

func BigEndianUint24

func BigEndianUint24(raw []byte) uint32

BigEndianUint24 returns the value of a big endian uint24

func Max

func Max(a, b int) int

Max returns the larger value

func PutBigEndianUint24

func PutBigEndianUint24(out []byte, in uint32)

PutBigEndianUint24 encodes a uint24 and places into out

func PutBigEndianUint48

func PutBigEndianUint48(out []byte, in uint64)

PutBigEndianUint48 encodes a uint64 and places into out

Types

This section is empty.

Jump to

Keyboard shortcuts

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