md2

package
v0.0.0-...-bb1a4e7 Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package md2 implements the MD2 hash algorithm as defined in RFC 1319.

Index

Examples

Constants

View Source
const (
	// The size of an MD2 checksum in bytes.
	Size = 16
	// The blocksize of MD2 in bytes.
	BlockSize = 16
)

Variables

View Source
var PiSubst = []uint8{}/* 256 elements not displayed */

Functions

func Encoder

func Encoder(data []byte) ([]byte, error)

func New

func New() hash.Hash

New returns a new hash.Hash computing the MD2 checksum.

Example
h := New()
io.WriteString(h, "The fog is getting thicker!")
io.WriteString(h, "And Leon's getting laaarger!")
fmt.Printf("%x", h.Sum(nil))
Output:

Types

type Md2Digest

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

digest represents the partial evaluation of a checksum.

func NewMd2

func NewMd2() *Md2Digest

New returns a new hash.Hash computing the MD2 checksum.

func (*Md2Digest) BlockSize

func (dg *Md2Digest) BlockSize() int

func (*Md2Digest) Reset

func (dg *Md2Digest) Reset()

func (*Md2Digest) Resolve

func (dg *Md2Digest) Resolve() []byte

func (*Md2Digest) Size

func (dg *Md2Digest) Size() int

func (*Md2Digest) Sum

func (dg *Md2Digest) Sum(in []byte) []byte

func (*Md2Digest) Write

func (dg *Md2Digest) Write(p []byte) (nn int, err error)

Write is the interface for IO Writer

Jump to

Keyboard shortcuts

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