pkg

package module
v0.0.0-...-72b999b Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrHashFailed = errors.InternalServer(reason, "Hash password failed")

Functions

func GetFileSize

func GetFileSize(filename string) (int64, error)

func HashPassword

func HashPassword(password string) (string, error)

func IOMd5

func IOMd5(file io.Reader) (string, int64, error)

func IOSha1

func IOSha1(ioReader io.Reader) (string, int64, error)

func MD5

func MD5(data []byte) (string, int64, error)

func PathExists

func PathExists(path string) (bool, error)

func Sha1

func Sha1(data []byte) (string, int64, error)

func VerifyPassword

func VerifyPassword(hashed, password string) bool

Types

type Sha1Stream

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

func (*Sha1Stream) Reset

func (ss *Sha1Stream) Reset()

func (*Sha1Stream) Sum

func (ss *Sha1Stream) Sum() string

func (*Sha1Stream) UpdateByte

func (ss *Sha1Stream) UpdateByte(data []byte) (size int64, err error)

func (*Sha1Stream) UpdateIO

func (ss *Sha1Stream) UpdateIO(ioReader io.Reader) (size int64, err error)

Jump to

Keyboard shortcuts

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