bldy.build / build / racy

Index | Files | Exmaples | Directories
go get bldy.build/build/racy

Package racy deals with file cryptography

Index

Package Files

racy.go xor.go

Variables

var NewHash = sha512.New

NewHash returns a new hash.Hash

func XOR

func XOR(hs ...[]byte) []byte

XOR takes 2 or more byte slices and xors them.

func XORBytes

func XORBytes(a, b []byte) []byte

XORBytes takes two byte slices and XORs them

type Option

type Option func(*Racy)

func AllowExtension

func AllowExtension(ext string) Option

type Racy

type Racy struct {
    hash.Hash
    // contains filtered or unexported fields
}

Racy is used in hashing targets. https://www.kernel.org/pub/software/scm/git/docs/technical/racy-git.txt

func New

func New(options ...Option) *Racy

New takes nothing and returns a new Racy

func (*Racy) HashFiles

func (r *Racy) HashFiles(files ...string) error

func (*Racy) HashSkylarkValue

func (r *Racy) HashSkylarkValue(v skylark.Value)

func (*Racy) HashSkylarkValues

func (r *Racy) HashSkylarkValues(vals ...skylark.Value)

func (*Racy) HashStrings

func (r *Racy) HashStrings(strs ...string)

HashStrings hashes strings written to Racy

Subdirectories