hash

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package hash provides a hash function used in goma.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SHA256Content

func SHA256Content(b []byte) string

SHA256Content returns a hexdecimal representation of the SHA256 hash of the given content.

func SHA256File

func SHA256File(path string) (string, error)

SHA256File returns a hexadecimal representation of the SHA256 hash of the file contents.

func SHA256HMAC

func SHA256HMAC(key []byte, data []byte) string

SHA256HMAC returns a hexdecimal representation of the SHA256 hmac of the given two content.

func SHA256Proto

func SHA256Proto(m proto.Message) (string, error)

SHA256Proto returns a hexdecimal representation of the SHA256 hash of the given protocol buffer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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