hashutil

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package hashutil provides utility functions to generate and validate hash.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashSHA1

func HashSHA1(value string) (string, error)

HashSHA1 generates and returns an SHA1 hash.

func HashSHA256 added in v1.2.4

func HashSHA256(value string) (string, error)

HashSHA256 generates and returns an SHA256 hash.

func VerifySHA1

func VerifySHA1(hashedValue, value string) (bool, error)

VerifySHA1 checks if the plaintext value matches the given sha1 hash.

func VerifySHA256 added in v1.2.4

func VerifySHA256(hashedValue, value string) (bool, error)

VerifySHA256 checks if the plaintext value matches the given sha256 hash.

Types

This section is empty.

Jump to

Keyboard shortcuts

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