notsha256

package
v0.9.2202 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package notsha256 implements the NOTSHA256 algorithm, a hash defined as bitwise NOT of SHA256. It is used in situations where exact fidelity to SHA256 is unnecessary. In particular, it is used in the compiler toolchain, which cannot depend directly on cgo when GOEXPERIMENT=boringcrypto (and in that mode the real sha256 uses cgo).

Index

Constants

View Source
const BlockSize = 64

The blocksize in bytes.

View Source
const Size = 32

The size of a checksum in bytes.

Variables

This section is empty.

Functions

func New

func New() hash.Hash

New returns a new hash.Hash computing the NOTSHA256 checksum. state of the hash.

func Sum256

func Sum256(data []byte) [Size]byte

Sum256 returns the SHA256 checksum of the data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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