hash

package
Version: v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL