hash

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2014 License: BSD-3-Clause Imports: 3 Imported by: 0

README

Hash

A simple library to generate hashes for data comparison.

Usage

All functions return a string containing the base64 encoded sha1 hash of the input.

To hash some bytes:

val := hash.Bytes(data)

To hash a file:

val := hash.File("/tmp/somefile")

License

Copyright (c) 2014 Ryan Bourgeois. Licensed under BSD-Modified. See the LICENSE file for a copy of the license.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(data []byte) string

Return a hash for some data.

func File

func File(path string) (string, error)

Return the hash of a file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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