jose2go: Index | Files

package arrays

import ""

Package arrays provides various byte array utilities


Package Files


func Concat Uses

func Concat(arrays ...[]byte) []byte

Concat combine several arrays into single one, resulting slice = A1 | A2 | A3 | ... | An

func Dump Uses

func Dump(arr []byte) string

Dump produces printable debug representation of byte array as string

func Random Uses

func Random(byteCount int) ([]byte, error)

Random generates byte array with random data of byteCount length

func Slice Uses

func Slice(arr []byte, count int) [][]byte

Slice is splitting input byte array into slice of subarrays. Each of count length.

func UInt32ToBytes Uses

func UInt32ToBytes(value uint32) []byte

UInt32ToBytes unwrap uint32 value to byte array of length 4 using big endian

func UInt64ToBytes Uses

func UInt64ToBytes(value uint64) []byte

UInt64ToBytes unwrap uint64 value to byte array of length 8 using big endian

func Unwrap Uses

func Unwrap(arrays [][]byte) []byte

Unwrap same thing as Contact, just different interface, combines several array into single one

func Xor Uses

func Xor(left, right []byte) []byte

Xor is doing byte by byte exclusive or of 2 byte arrays

Package arrays imports 5 packages (graph) and is imported by 15 packages. Updated 2016-07-22. Refresh now. Tools for package owners.