xor

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2020 License: BSD-3-Clause Imports: 0 Imported by: 0

README

xor

Package xor implements XOR operations on byte slices. Extracted from crypto/cipher.

Reference

  • issues/30553 as rejected proposal to provide XOR in go stdlib

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(dst, a, b []byte) int

Bytes xors the bytes in a and b. The destination should have enough space, otherwise Bytes will panic. Returns the number of bytes xor'd.

func Words

func Words(dst, a, b []byte)

Words XORs multiples of 4 or 8 bytes (depending on architecture.) The slice arguments a and b are assumed to be of equal length.

Types

This section is empty.

Jump to

Keyboard shortcuts

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