package arrays
import "github.com/dvsekhvalnov/jose2go/arrays"
Package arrays provides various byte array utilities
Index ¶
- func Concat(arrays ...[]byte) []byte
- func Dump(arr []byte) string
- func Random(byteCount int) ([]byte, error)
- func Slice(arr []byte, count int) [][]byte
- func UInt32ToBytes(value uint32) []byte
- func UInt64ToBytes(value uint64) []byte
- func Unwrap(arrays [][]byte) []byte
- func Xor(left, right []byte) []byte
Functions ¶
func Concat ¶
Concat combine several arrays into single one, resulting slice = A1 | A2 | A3 | ... | An
func Dump ¶
Dump produces printable debug representation of byte array as string
func Random ¶
Random generates byte array with random data of byteCount length
func Slice ¶
Slice is splitting input byte array into slice of subarrays. Each of count length.
func UInt32ToBytes ¶
UInt32ToBytes unwrap uint32 value to byte array of length 4 using big endian
func UInt64ToBytes ¶
UInt64ToBytes unwrap uint64 value to byte array of length 8 using big endian
func Unwrap ¶
Unwrap same thing as Contact, just different interface, combines several array into single one
func Xor ¶
Xor is doing byte by byte exclusive or of 2 byte arrays
Source Files ¶
- Version
- v1.8.0 (latest)
- Published
- Nov 12, 2024
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 5 days ago –
Tools for package owners.