encryption

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

View Source
const HASH_LENGTH = 32

Variables

View Source
var EmptyHash = Hash("")

EmptyHash - hash of an empty string

View Source
var EmptyHashBytes = RawHash("")

EmptyHashBytes - hash bytes of an empty string

View Source
var ErrInvalidHash = common.NewError("invalid_hash", "Invalid hash")

ErrInvalidHash - hash is invalid error

Functions

func Hash

func Hash(data interface{}) string

Hash - hash the given data and return the hash as hex string

func IsHash

func IsHash(str string) bool

func RawHash

func RawHash(data interface{}) []byte

RawHash - Logic to hash the text and return the hash bytes

Types

type HashBytes

type HashBytes [HASH_LENGTH]byte

Jump to

Keyboard shortcuts

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