checksums

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: May 24, 2016 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChecksumResult

type ChecksumResult struct {
	// contains filtered or unexported fields
}

ChecksumResult just contains the result of some checksum (md5) and gives us easy access to encoding it as hex or bytes, etc

func NewChecksumResultFromHex

func NewChecksumResultFromHex(hexStr string) (*ChecksumResult, error)

NewChecksumResultFromHex creates a new ChecksumResult from the input hex string

func (*ChecksumResult) Bytes

func (c *ChecksumResult) Bytes() []byte

Bytes will return the checksum as a byte slice

func (*ChecksumResult) HexString

func (c *ChecksumResult) HexString() string

HexString will return the checksum encoded as hex

type Service

type Service interface {
	ReaderChecksum(reader io.Reader) (*ChecksumResult, error)
	FileChecksum(filePath string) (*ChecksumResult, error)
}

Service is the checksums service

func New

func New() Service

New creates a new Service instance

Jump to

Keyboard shortcuts

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