package util

import "github.com/pion/dtls/v3/internal/util"

Package util contains small helpers used across the repo

Index

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

Source Files

util.go

Version
v3.0.4 (latest)
Published
Nov 4, 2024
Platform
linux/amd64
Imports
2 packages
Last checked
1 week ago

Tools for package owners.