hashsink

package
v0.0.0-...-17f76c2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package hashsink implements io.reader and io.writer that hashes the payload as operating on data

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader ...

func NewReader

func NewReader(
	reader io.Reader,
	size int64,

) *Reader

New ...

func (*Reader) MD5

func (r *Reader) MD5() []byte

MD5 ...

func (*Reader) MD5Base64String

func (r *Reader) MD5Base64String() string

MD5Base64String ...

func (*Reader) MD5HexString

func (r *Reader) MD5HexString() string

MD5HexString ...

func (*Reader) Read

func (r *Reader) Read(p []byte) (n int, err error)

Read ...

func (*Reader) SHA256

func (r *Reader) SHA256() []byte

SHA256 ...

func (*Reader) SHA256Base64String

func (r *Reader) SHA256Base64String() string

SHA256Base64String ...

func (*Reader) SHA256HexString

func (r *Reader) SHA256HexString() string

SHA256HexString ...

type Writer

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

Writer ...

func NewWriter

func NewWriter(
	writer io.Writer,
) *Writer

NewWriter ...

func (*Writer) MD5

func (w *Writer) MD5() []byte

MD5 ...

func (*Writer) MD5Base64String

func (w *Writer) MD5Base64String() string

MD5Base64String ...

func (*Writer) MD5HexString

func (w *Writer) MD5HexString() string

MD5HexString ...

func (*Writer) SHA256

func (w *Writer) SHA256() []byte

SHA256 ...

func (*Writer) SHA256Base64String

func (w *Writer) SHA256Base64String() string

SHA256Base64String ...

func (*Writer) SHA256HexString

func (w *Writer) SHA256HexString() string

SHA256HexString ...

func (*Writer) Write

func (w *Writer) Write(p []byte) (n int, err error)

Read ...

Jump to

Keyboard shortcuts

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