hash

package module
v0.0.0-...-1a65eee Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

README

NOTE: This repository contains code for my own personal use and I make no guarantees regarding suitability, compatibility, etc. If you make use of this work anyway, pull requests are welcome but I also don't guarantee I will merge or even address them.

hash

Package hash provides simple utilities for working with hashing algorithms.

Usage

go get github.com/haleyrc/hash

Documentation

Overview

Package hash provides simple utilities for working with hashing algorithms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(guess, hash string) error

Check returns an error if the provided hash is not the hash of the provided guess or nil otherwise. The comparison is guaranteed to be constant time.

func Generate

func Generate(s string) string

Generate returns a hashed version of the provided string. This function panics if there is an error, since there's not much that can be done and it simplifies the API significantly.

Types

This section is empty.

Jump to

Keyboard shortcuts

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