byteutils

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package byteutils provides helper utilities for working with bytes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesTo32Byte

func BytesTo32Byte(bytes []byte) ([32]byte, error)

BytesTo32Byte converts bytes slice to a 32-byte array. It left pads the array with zeros in case of a slice shorter than 32-byte.

func LeftPadTo32Bytes

func LeftPadTo32Bytes(bytes []byte) ([]byte, error)

LeftPadTo32Bytes appends zeros to bytes slice to make it exactly 32 bytes long. TODO: This is copied from keep-core. Consider extracting utils to a separate repo.

Types

This section is empty.

Jump to

Keyboard shortcuts

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