hex

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Overview

Package hex provides utilities for hexadecimal encoding and decoding operations. It wraps the standard library's encoding/hex package with additional error handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeString

func DecodeString(src string) []byte

DecodeString decodes a hexadecimal string to its byte slice representation. Returns nil if the input string is not valid hexadecimal. This provides safer error handling compared to the standard library function. Optimized version with early validation to avoid unnecessary allocations.

func EncodeToString

func EncodeToString(src []byte) string

EncodeToString encodes a byte slice to its hexadecimal string representation. This is a direct wrapper around the standard library's hex.EncodeToString function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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