package sha256
import "github.com/minio/sha256-simd"
Index ¶
- Constants
- func New() hash.Hash
- func NewAvx512(a512srv *Avx512Server) hash.Hash
- func Sum256(data []byte) (result [Size]byte)
- type Avx512Digest
- func (d Avx512Digest) BlockSize() int
- func (d *Avx512Digest) Reset()
- func (d *Avx512Digest) Size() int
- func (d *Avx512Digest) Sum(in []byte) (result []byte)
- func (d *Avx512Digest) Write(p []byte) (nn int, err error)
- type Avx512LaneInfo
- type Avx512Server
Constants ¶
const Avx512ServerUID = 16
Avx512ServerUID - Do not start at 0 but next multiple of 16 so as to be able to differentiate with default initialiation value of 0
const BlockSize = 64
BlockSize - The blocksize of SHA256 in bytes.
const Size = 32
Size - The size of a SHA256 checksum in bytes.
Functions ¶
func New ¶
New returns a new hash.Hash computing the SHA256 checksum.
func NewAvx512 ¶
func NewAvx512(a512srv *Avx512Server) hash.Hash
NewAvx512 - initialize sha256 Avx512 implementation.
func Sum256 ¶
Sum256 - single caller sha256 helper
Types ¶
type Avx512Digest ¶
type Avx512Digest struct {
// contains filtered or unexported fields
}
Avx512Digest - Type for computing SHA256 using Avx512
func (Avx512Digest) BlockSize ¶
func (d Avx512Digest) BlockSize() int
BlockSize - Return blocksize of checksum
func (*Avx512Digest) Reset ¶
func (d *Avx512Digest) Reset()
Reset - reset sha digest to its initial values
func (*Avx512Digest) Size ¶
func (d *Avx512Digest) Size() int
Size - Return size of checksum
func (*Avx512Digest) Sum ¶
func (d *Avx512Digest) Sum(in []byte) (result []byte)
Sum - Return sha256 sum in bytes
func (*Avx512Digest) Write ¶
func (d *Avx512Digest) Write(p []byte) (nn int, err error)
Write to digest
type Avx512LaneInfo ¶
type Avx512LaneInfo struct {
// contains filtered or unexported fields
}
Avx512LaneInfo - Info for each lane
type Avx512Server ¶
type Avx512Server struct {
// contains filtered or unexported fields
}
Avx512Server - Type to implement 16x parallel handling of SHA256 invocations
func NewAvx512Server ¶
func NewAvx512Server() *Avx512Server
NewAvx512Server - Create new object for parallel processing handling
func (*Avx512Server) Process ¶
func (a512srv *Avx512Server) Process()
Process - Sole handler for reading from the input channel
func (*Avx512Server) Sum ¶
func (a512srv *Avx512Server) Sum(uid uint64, p []byte) [32]byte
Sum - return sha256 sum in bytes for a given sum id.
func (*Avx512Server) Write ¶
func (a512srv *Avx512Server) Write(uid uint64, p []byte) (nn int, err error)
Source Files ¶
cpuid.go cpuid_amd64.go sha256.go sha256blockAvx2_amd64.go sha256blockAvx512_amd64.go sha256blockAvx_amd64.go sha256blockSha_amd64.go sha256blockSsse_amd64.go sha256block_amd64.go
- Version
- v0.1.1
- Published
- Sep 13, 2019
- Platform
- windows/amd64
- Imports
- 8 packages
- Last checked
- now –
Tools for package owners.