...

Package sha256

import "crypto/internal/fips140/sha256"
Overview
Index

Overview ▾

Package sha256 implements the SHA-224 and SHA-256 hash algorithms as defined in FIPS 180-4.

type Digest

Digest is a SHA-224 or SHA-256 hash.Hash implementation.

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

func New

func New() *Digest

New returns a new Digest computing the SHA-256 hash.

func New224

func New224() *Digest

New224 returns a new Digest computing the SHA-224 hash.

func (*Digest) AppendBinary

func (d *Digest) AppendBinary(b []byte) ([]byte, error)

func (*Digest) BlockSize

func (d *Digest) BlockSize() int

func (*Digest) MarshalBinary

func (d *Digest) MarshalBinary() ([]byte, error)

func (*Digest) Reset

func (d *Digest) Reset()

func (*Digest) Size

func (d *Digest) Size() int

func (*Digest) Sum

func (d *Digest) Sum(in []byte) []byte

func (*Digest) UnmarshalBinary

func (d *Digest) UnmarshalBinary(b []byte) error

func (*Digest) Write

func (d *Digest) Write(p []byte) (nn int, err error)