package notsha256
import "cmd/internal/notsha256"
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 ¶
const BlockSize = 64
The blocksize in bytes.
const Size = 32
The size of a checksum in bytes.
Functions ¶
func New ¶
New returns a new hash.Hash computing the NOTSHA256 checksum. state of the hash.
func Sum256 ¶
Sum256 returns the SHA256 checksum of the data.
Source Files ¶
sha256.go sha256block.go sha256block_generic.go
- Version
- v1.21.6
- Published
- Jan 4, 2024
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 9 minutes ago –
Tools for package owners.