hashverifyreader

package
v0.0.0-...-a5f7211 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

If you know the hash of a stream beforehand, wrap it with this to get integrity-verified io.Reader

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(source io.Reader, hash hash.Hash, expectedHash []byte) io.Reader

creates a two-part reader whose first part is connected to source, and the second part (= when source read to EOF) Read() (on hashVerifyReader) immediately returns EOF if hash matches

Types

This section is empty.

Jump to

Keyboard shortcuts

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