Back to godoc.org

Package hash

v0.0.15
Latest Go to latest

The latest major version is .

Published: Jul 31, 2020 | License: BSD-3-Clause | Module: go.chromium.org/goma/server

Overview

Package hash provides a hash function used in goma.

Index

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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier