md5

package
v0.0.0-...-e61308d Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Examples

Constants

View Source
const (
	// The size of an MD5 checksum in bytes.
	Size = C.MD5_DIGEST_LENGTH

	// The blocksize of MD5 in bytes.
	BlockSize = 64
)

Variables

This section is empty.

Functions

func New

func New() hash.Hash

New returns a new MD5 hash.Hash if the returned hash is empty, then make a call to sslerr.Error()

Example
package main

import (
	"fmt"
	"io"

	"github.com/shanemhansen/gossl/crypto/md5"
)

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

e2c569be17396eca2a2e3c11578123ed

func Sum

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

Sum returns the MD5 checksum of the data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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