hash

package
v0.28.3 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: GPL-3.0 Imports: 7 Imported by: 6

README

hash

Helper functions for hash sums.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crc32Sum

type Crc32Sum [4]byte

Crc32Sum is an CRC-32 hash sum as a byte array.

func CalculateCrc32

func CalculateCrc32(data []byte) (resultAsBytes Crc32Sum, resultAsText string)

CalculateCrc32 calculates the CRC-32 check sum and returns it as a hexadecimal text and byte array.

type Md5Sum

type Md5Sum [16]byte

Md5Sum is an MD-5 hash sum as a byte array.

func CalculateMd5

func CalculateMd5(data []byte) (resultAsBytes Md5Sum, resultAsText string)

CalculateMd5 calculates the MD-5 check sum and returns it as a hexadecimal text and byte array.

type Sha1Sum

type Sha1Sum [20]byte

Sha1Sum is an SHA-1 hash sum as a byte array.

func CalculateSha1

func CalculateSha1(data []byte) (resultAsBytes Sha1Sum, resultAsText string)

CalculateSha1 calculates the SHA-1 check sum and returns it as a hexadecimal text and byte array.

type Sha256Sum

type Sha256Sum [32]byte

Sha256Sum is an SHA-256 hash sum as a byte array.

func CalculateSha256

func CalculateSha256(data []byte) (resultAsBytes Sha256Sum, resultAsText string)

CalculateSha256 calculates the SHA-256 check sum and returns it as a hexadecimal text and byte array.

Jump to

Keyboard shortcuts

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