md2

package
v0.0.0-...-c8d11d7 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Examples

Constants

View Source
const BlockSize = 16

The blocksize of MD2 in bytes.

View Source
const MD2HashID = 101
View Source
const Size = 16

The size of an MD2 checksum in bytes.

Variables

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

Functions

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:

Example
package main

import (
	"fmt"
	"io"

	"github.com/jinwong001/openpgp/internal/md2"
)

func main() {
	h := md2.New()
	data := "These pretzels are making me thirsty."
	io.WriteString(h, data)
	fmt.Printf("%x", h.Sum(nil))
}
Output:

48c4e365090b30a32f084c4888deceaa

Types

This section is empty.

Jump to

Keyboard shortcuts

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