md5

Imports

Imports #

"crypto"
"crypto/internal/fips140only"
"errors"
"hash"
"internal/byteorder"
"internal/byteorder"
"math/bits"

Constants & Variables

BlockSize const #

The blocksize of MD5 in bytes.

const BlockSize = 64

Size const #

The size of an MD5 checksum in bytes.

const Size = 16

haveAsm const #

const haveAsm = true

haveAsm const #

const haveAsm = false

init0 const #

const init0 = 0x67452301

init1 const #

const init1 = 0xEFCDAB89

init2 const #

const init2 = 0x98BADCFE

init3 const #

const init3 = 0x10325476

magic const #

const magic = "md5\x01"

marshaledSize const #

const marshaledSize = *ast.BinaryExpr

Structs

digest struct #

digest represents the partial evaluation of a checksum.

type digest struct {
s [4]uint32
x [BlockSize]byte
nx int
len uint64
}

Functions

AppendBinary method #

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

BlockSize method #

func (d *digest) BlockSize() int

MarshalBinary method #

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

New function #

New returns a new [hash.Hash] computing the MD5 checksum. The Hash also implements [encoding.BinaryMarshaler], [encoding.BinaryAppender] and [encoding.BinaryUnmarshaler] to marshal and unmarshal the internal state of the hash.

func New() hash.Hash

Reset method #

func (d *digest) Reset()

Size method #

func (d *digest) Size() int

Sum function #

Sum returns the MD5 checksum of the data.

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

Sum method #

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

UnmarshalBinary method #

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

Write method #

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

block function #

go:noescape

func block(dig *digest, p []byte)

block function #

func block(dig *digest, p []byte)

blockGeneric function #

func blockGeneric(dig *digest, p []byte)

checkSum method #

func (d *digest) checkSum() [Size]byte

consumeUint32 function #

func consumeUint32(b []byte) ([]byte, uint32)

consumeUint64 function #

func consumeUint64(b []byte) ([]byte, uint64)

init function #

func init()

Generated with Arrow