Documentation
¶
Index ¶
- Constants
- Variables
- func And(inputOutput []byte, operand []byte) (err error)
- func ByteSliceToWordSlice(inputBytes []byte) (outputWords []uint)
- func MakeMask(size uint, width uint, offset uint) (outputMask []byte)
- func Or(inputOutput []byte, operand []byte) (err error)
- func ShiftLeft(inputBuffer []byte, shiftCount uint) (outputBuffer []byte, err error)
- func ShiftRight(inputBuffer []byte, shiftCount uint) (outputBuffer []byte, err error)
- func ShiftWordsSliceLeft(buff []uint, shiftWords int) (returnBuff []uint)
- func ShiftWordsSliceRight(buff []uint, shiftWords int) (returnBuff []uint)
- func WordSliceToByteSlice(inputWords []uint) (outputBytes []byte)
- type ByteOrder
Constants ¶
View Source
const BitsWordSize = BytesWordSize * 8
BitsWordSize holds the number of bits in a uint word
View Source
const BytesWordSize = uint(unsafe.Sizeof(uint(0)))
BytesWordSize holds the size in bytes of a uint word
Variables ¶
View Source
var BigEndian bigEndian
BigEndian is the big-endian implementation of ByteOrder.
View Source
var LittleEndian littleEndian
LittleEndian is the little-endian implementation of ByteOrder.
Functions ¶
func ByteSliceToWordSlice ¶
ByteSliceToWordSlice converts a slice of bytes into a slice of words
func ShiftRight ¶
ShiftRight shifts a slice of bytes shiftCount bits to the right
func ShiftWordsSliceLeft ¶
ShiftWordsSliceLeft shifts a slice of words x words left
func ShiftWordsSliceRight ¶
ShiftWordsSliceRight shifts a slice of words x words left
func WordSliceToByteSlice ¶
BytesSliceToWordSlice converts a slice of words into a slice of bytes
Types ¶
type ByteOrder ¶
type ByteOrder interface {
Uint8([]byte) uint8
Uint16([]byte) uint16
Uint24([]byte) uint32
Uint32([]byte) uint32
Uint40([]byte) uint64
Uint48([]byte) uint64
Uint56([]byte) uint64
Uint64([]byte) uint64
OrPutUint8([]byte, uint8)
OrPutUint16([]byte, uint16)
OrPutUint24([]byte, uint32)
OrPutUint32([]byte, uint32)
OrPutUint40([]byte, uint64)
OrPutUint48([]byte, uint64)
OrPutUint56([]byte, uint64)
OrPutUint64([]byte, uint64)
}
ByteOrder specifies how to convert byte sequences into 16-, 32-, or 64-bit unsigned integers.
Click to show internal directories.
Click to hide internal directories.