hashing

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

* Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved. * SPDX-License-Identifier: Apache-2.0

* Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved. * SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	HashMd5    = "MD5"
	HashSha256 = "SHA256"
	HashSha1   = "SHA1"
	HashMurmur = "Murmur"
	HashXXHash = "xxhash" //https://github.com/OneOfOne/xxhash
)

Variables

This section is empty.

Functions

func CalculateHash

func CalculateHash(text, htype string) string

func CalculateMD5Hash

func CalculateMD5Hash(text string) string

Types

type IHash

type IHash interface {
	Calculate(reader io.Reader) (string, error)
	GetType() string
}

IHash defines a hashing algorithm.

func NewHashingAlgorithm

func NewHashingAlgorithm(htype string) (IHash, error)

Jump to

Keyboard shortcuts

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