arrays

package
v0.0.0-...-3d3ad9f Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package arrays provides various byte array utilities

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Concat

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

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

func Dump

func Dump(arr []byte) string

Dump produces printable debug representation of byte array as string

func Random

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

Random generates byte array with random data of byteCount length

func Slice

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

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

func UInt32ToBytes

func UInt32ToBytes(value uint32) []byte

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

func UInt64ToBytes

func UInt64ToBytes(value uint64) []byte

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

func Unwrap

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

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

func Xor

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

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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