racy

package
v0.0.0-...-d04b29a Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2018 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package racy deals with file cryptography

Index

Constants

This section is empty.

Variables

View Source
var NewHash = sha512.New

NewHash returns a new hash.Hash

Functions

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

Types

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

Jump to

Keyboard shortcuts

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